27 #include "precompiled.h"
36 #define ENABLE_ARCHIVE_STATS 0
37 #if ENABLE_ARCHIVE_STATS
38 static std::vector<const VfsFile*> s_looseFiles;
39 static size_t s_numArchivedFiles;
63 #if ENABLE_ARCHIVE_STATS
64 s_looseFiles.reserve(10000);
76 std::sort(subdirectoryNames.begin(), subdirectoryNames.end());
98 #if ENABLE_ARCHIVE_STATS
105 s_looseFiles.push_back(pfile);
131 #if ENABLE_ARCHIVE_STATS
132 s_numArchivedFiles++;
140 for(
size_t i = 0; i < files.size(); i++)
142 const OsPath pathname = path / files[i].Name();
160 for(
size_t i = 0; i < subdirectoryNames.size(); i++)
164 if(subdirectoryNames[i] == L
".svn")
186 realDirectory->Watch();
PRealDirectory m_realDirectory
VfsFile * AddFile(const VfsFile &file)
Status vfs_Lookup(const VfsPath &pathname, VfsDirectory *startDirectory, VfsDirectory *&directory, VfsFile **pfile, size_t flags)
Resolve a pathname.
#define WARN_IF_ERR(expression)
const OsPath & Name() const
static void AddArchiveFile(const VfsPath &pathname, const CFileInfo &fileInfo, PIArchiveFile archiveFile, uintptr_t cbData)
void RemoveFile(const VfsPath &name)
remove the given file from the virtual directory (no effect on the physical file).
void AddFile(const CFileInfo &fileInfo) const
bool operator()(const CFileInfo &a, const CFileInfo &b)
PIArchiveReader CreateArchiveReader_Zip(const OsPath &archivePathname)
const PRealDirectory & AssociatedDirectory() const
Status GetDirectoryEntries(const OsPath &path, CFileInfos *files, DirectoryNames *subdirectoryNames)
void SetAssociatedDirectory(const PRealDirectory &realDirectory)
side effect: the next ShouldPopulate() will return true.
#define UNUSED2(param)
mark a function local variable or parameter as unused and avoid the corresponding compiler warning...
shared_ptr< IArchiveReader > PIArchiveReader
PRealDirectory CreateRealSubdirectory(const PRealDirectory &realDirectory, const OsPath &subdirectoryName)
keep the files named "*.DELETED" visible in the VFS directories.
shared_ptr< RealDirectory > PRealDirectory
Status AddEntries() const
Status vfs_Attach(VfsDirectory *directory, const PRealDirectory &realDirectory)
attach a real directory to a VFS directory.
PopulateHelper(VfsDirectory *directory, const PRealDirectory &realDirectory)
anything mounted from here should be included when building archives.
all real directories mounted during this operation will be watched for changes.
i64 Status
Error handling system.
NONCOPYABLE(PopulateHelper)
Status AddFiles(const CFileInfos &files) const
shared_ptr< IArchiveFile > PIArchiveFile
Status vfs_Populate(VfsDirectory *directory)
populate the directory from the attached real directory.
std::vector< OsPath > DirectoryNames
VfsDirectory *const m_directory
void AddSubdirectories(const DirectoryNames &subdirectoryNames) const
std::vector< CFileInfo > CFileInfos
VfsDirectory * AddSubdirectory(const VfsPath &name)
#define RETURN_STATUS_IF_ERR(expression)