27#ifndef INCLUDED_VFS_TREE
28#define INCLUDED_VFS_TREE
Definition: vfs_tree.h:79
void SetAssociatedDirectory(const PRealDirectory &realDirectory)
side effect: the next ShouldPopulate() will return true.
Definition: vfs_tree.cpp:173
VfsFile * GetFile(const VfsPath &name)
Definition: vfs_tree.cpp:156
VfsFile * AddFile(const VfsFile &file)
Definition: vfs_tree.cpp:120
std::map< VfsPath, VfsFile > VfsFiles
Definition: vfs_tree.h:88
VfsFiles m_files
Definition: vfs_tree.h:171
void RemoveFile(const VfsPath &name)
remove the given file from the virtual directory (no effect on the physical file).
Definition: vfs_tree.cpp:150
void Clear()
empty file and subdirectory lists (e.g.
Definition: vfs_tree.cpp:199
void DeleteSubtree(const VfsFile &file)
remove the given file or subdirectory according to the priority of the passed .DELETED file.
Definition: vfs_tree.cpp:88
std::map< VfsPath, VfsDirectory > VfsSubdirectories
Definition: vfs_tree.h:89
bool m_shouldPopulate
Definition: vfs_tree.h:175
VfsDirectory * AddSubdirectory(const VfsPath &name)
Definition: vfs_tree.cpp:142
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:102
VfsDirectory * GetSubdirectory(const VfsPath &name)
Definition: vfs_tree.cpp:164
const VfsSubdirectories & Subdirectories() const
Definition: vfs_tree.h:137
VfsSubdirectories m_subdirectories
Definition: vfs_tree.h:172
PRealDirectory m_realDirectory
Definition: vfs_tree.h:174
const VfsFiles & Files() const
Definition: vfs_tree.h:132
bool ShouldPopulate()
Definition: vfs_tree.cpp:182
VfsDirectory()
Definition: vfs_tree.cpp:47
void RequestRepopulate()
ensure the next ShouldPopulate returns true.
Definition: vfs_tree.cpp:193
const PRealDirectory & AssociatedDirectory() const
Definition: vfs_tree.h:147
Definition: vfs_tree.h:38
size_t Priority() const
Definition: vfs_tree.h:57
const VfsPath & Name() const
Definition: vfs_tree.h:42
time_t MTime() const
Definition: vfs_tree.h:52
const PIFileLoader & Loader() const
Definition: vfs_tree.h:62
size_t Size() const
Definition: vfs_tree.h:47
VfsPath m_name
Definition: vfs_tree.h:68
size_t m_size
Definition: vfs_tree.h:69
time_t m_mtime
Definition: vfs_tree.h:70
VfsFile(const VfsPath &name, size_t size, time_t mtime, size_t priority, const PIFileLoader &provider)
Definition: vfs_tree.cpp:38
PIFileLoader m_loader
Definition: vfs_tree.h:74
size_t m_priority
Definition: vfs_tree.h:72
std::shared_ptr< IFileLoader > PIFileLoader
Definition: file_loader.h:39
std::shared_ptr< RealDirectory > PRealDirectory
Definition: real_directory.h:73
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:242
std::wstring FileDescriptions(const VfsDirectory &directory, size_t indentLevel)
Definition: vfs_tree.cpp:222
std::wstring FileDescription(const VfsFile &file)
Definition: vfs_tree.cpp:210