27#ifndef INCLUDED_VFS_TREE
28#define INCLUDED_VFS_TREE
Definition: vfs_tree.h:80
void SetAssociatedDirectory(const PRealDirectory &realDirectory)
side effect: the next ShouldPopulate() will return true.
Definition: vfs_tree.cpp:179
VfsFile * GetFile(const VfsPath &name)
Definition: vfs_tree.cpp:162
VfsFile * AddFile(const VfsFile &file)
Definition: vfs_tree.cpp:126
std::map< VfsPath, VfsFile > VfsFiles
Definition: vfs_tree.h:89
VfsFiles m_files
Definition: vfs_tree.h:172
void RemoveFile(const VfsPath &name)
remove the given file from the virtual directory (no effect on the physical file).
Definition: vfs_tree.cpp:156
void Clear()
empty file and subdirectory lists (e.g.
Definition: vfs_tree.cpp:205
void DeleteSubtree(const VfsFile &file)
remove the given file or subdirectory according to the priority of the passed .DELETED file.
Definition: vfs_tree.cpp:94
std::map< VfsPath, VfsDirectory > VfsSubdirectories
Definition: vfs_tree.h:90
bool m_shouldPopulate
Definition: vfs_tree.h:176
VfsDirectory * AddSubdirectory(const VfsPath &name)
Definition: vfs_tree.cpp:148
bool DeleteTree(const VfsFile &file)
remove all files with a lower priority than file and do the same for all subdirectories recursively.
Definition: vfs_tree.cpp:108
VfsDirectory * GetSubdirectory(const VfsPath &name)
Definition: vfs_tree.cpp:170
const VfsSubdirectories & Subdirectories() const
Definition: vfs_tree.h:138
VfsSubdirectories m_subdirectories
Definition: vfs_tree.h:173
PRealDirectory m_realDirectory
Definition: vfs_tree.h:175
const VfsFiles & Files() const
Definition: vfs_tree.h:133
bool ShouldPopulate()
Definition: vfs_tree.cpp:188
VfsDirectory()
Definition: vfs_tree.cpp:53
void RequestRepopulate()
ensure the next ShouldPopulate returns true.
Definition: vfs_tree.cpp:199
const PRealDirectory & AssociatedDirectory() const
Definition: vfs_tree.h:148
Definition: vfs_tree.h:39
size_t Priority() const
Definition: vfs_tree.h:58
const VfsPath & Name() const
Definition: vfs_tree.h:43
time_t MTime() const
Definition: vfs_tree.h:53
const PIFileLoader & Loader() const
Definition: vfs_tree.h:63
size_t Size() const
Definition: vfs_tree.h:48
VfsPath m_name
Definition: vfs_tree.h:69
size_t m_size
Definition: vfs_tree.h:70
time_t m_mtime
Definition: vfs_tree.h:71
VfsFile(const VfsPath &name, size_t size, time_t mtime, size_t priority, const PIFileLoader &provider)
Definition: vfs_tree.cpp:44
PIFileLoader m_loader
Definition: vfs_tree.h:75
size_t m_priority
Definition: vfs_tree.h:73
std::shared_ptr< IFileLoader > PIFileLoader
Definition: file_loader.h:44
std::shared_ptr< RealDirectory > PRealDirectory
Definition: real_directory.h:80
void DirectoryDescriptionR(std::wstring &descriptions, const VfsDirectory &directory, size_t indentLevel)
append each directory's files' description to the given string.
Definition: vfs_tree.cpp:248
std::wstring FileDescriptions(const VfsDirectory &directory, size_t indentLevel)
Definition: vfs_tree.cpp:228
std::wstring FileDescription(const VfsFile &file)
Definition: vfs_tree.cpp:216