3#include <DataIO/FileSystem/Path.h>
4#include <Utility/TUniquePtrVector.h>
5#include <Utility/TSpan.h>
25 struct CtorAccessToken
42 void populateChildren();
43 void removeChildren();
46 TUniquePtrVector<FileSystemDirectoryEntry> m_children;
48 std::string m_directoryName;
49 bool m_hasBeenPopulated;
57 std::optional<std::size_t>
addRootPath(
const Path& path);
76 bool withDirectories =
true)
const;
79 std::optional<std::size_t> findRootPathIndex(
const Path& rootPath)
const;
81 std::vector<Path> m_rootPaths;
82 TUniquePtrVector<FileSystemDirectoryEntry> m_rootDirectoryEntries;
83 std::size_t m_currentRootIndex;
Information for a filesystem directory.
Definition FileSystemExplorer.h:19
std::size_t numChildren() const
Definition FileSystemExplorer.cpp:44
bool haveChildren() const
Definition FileSystemExplorer.cpp:34
const std::string & getDirectoryName() const
Definition FileSystemExplorer.cpp:54
FileSystemDirectoryEntry * getChild(std::size_t childIndex) const
Definition FileSystemExplorer.cpp:39
FileSystemDirectoryEntry * getParent() const
Definition FileSystemExplorer.cpp:29
const Path & getDirectoryPath() const
Definition FileSystemExplorer.cpp:49
FileSystemDirectoryEntry(FileSystemDirectoryEntry *parent, Path directoryPath, CtorAccessToken)
Definition FileSystemExplorer.cpp:15
Definition FileSystemExplorer.h:53
std::optional< std::size_t > addRootPath(const Path &path)
Definition FileSystemExplorer.cpp:101
void expand(FileSystemDirectoryEntry *directoryEntry)
Expand the entry by linking it with potential child entries. Expanding an already-expanded entry has ...
Definition FileSystemExplorer.cpp:131
std::vector< Path > makeItemListing(FileSystemDirectoryEntry *directoryEntry, bool withDirectories=true) const
Definition FileSystemExplorer.cpp:143
const Path & getCurrentRootPath() const
Definition FileSystemExplorer.cpp:174
void collapse(FileSystemDirectoryEntry *directoryEntry)
Collapse the entry by removing all potential child entries. Collapsing an already-collapsed entry has...
Definition FileSystemExplorer.cpp:137
TSpanView< Path > getRootPaths() const
Definition FileSystemExplorer.cpp:169
void setCurrentRootPath(std::size_t rootPathIndex)
Definition FileSystemExplorer.cpp:122
FileSystemDirectoryEntry * getCurrentDirectoryEntry()
Definition FileSystemExplorer.cpp:180
FileSystemExplorer()
Definition FileSystemExplorer.cpp:90
Definition ph_editor.h:10