|
| VFS () |
|
virtual Status | Mount (const VfsPath &mountPoint, const OsPath &path, size_t flags, size_t priority) |
| mount a directory into the VFS. More...
|
|
virtual Status | GetFileInfo (const VfsPath &pathname, CFileInfo *pfileInfo) const |
| Retrieve information about a file (similar to POSIX stat). More...
|
|
virtual Status | GetFilePriority (const VfsPath &pathname, size_t *ppriority) const |
| Retrieve mount priority for a file. More...
|
|
virtual Status | GetDirectoryEntries (const VfsPath &path, CFileInfos *fileInfos, DirectoryNames *subdirectoryNames) const |
| Retrieve lists of all files and subdirectories in a directory. More...
|
|
virtual Status | CreateFile (const VfsPath &pathname, const std::shared_ptr< u8 > &fileContents, size_t size) |
| Create a file with the given contents. More...
|
|
virtual Status | LoadFile (const VfsPath &pathname, std::shared_ptr< u8 > &fileContents, size_t &size) |
| Read an entire file into memory. More...
|
|
virtual std::wstring | TextRepresentation () const |
|
virtual Status | GetOriginalPath (const VfsPath &pathname, OsPath &realPathname) |
| Retrieve the POSIX pathname a VFS file was loaded from. More...
|
|
virtual Status | GetRealPath (const VfsPath &pathname, OsPath &realPathname, bool createMissingDirectories) |
| Retrieve the real (POSIX) pathname underlying a VFS file. More...
|
|
virtual Status | GetDirectoryRealPath (const VfsPath &pathname, OsPath &realPathname, bool createMissingDirectories) |
| Retrieve the real (POSIX) pathname underlying a VFS directory. More...
|
|
virtual Status | GetVirtualPath (const OsPath &realPathname, VfsPath &pathname) |
| retrieve the VFS pathname that corresponds to a real file. More...
|
|
virtual Status | RemoveFile (const VfsPath &pathname) |
| remove file from the virtual directory listing. More...
|
|
virtual Status | RepopulateDirectory (const VfsPath &path) |
| request the directory be re-populated when it is next accessed. More...
|
|
virtual void | Clear () |
| empty the contents of the filesystem. More...
|
|
virtual | ~IVFS () |
|
Retrieve the POSIX pathname a VFS file was loaded from.
This is distinct from the current 'real' path, since that depends on the parent directory's real path, which may have been overwritten by a mod or another call to Mount().
This is used by the caching to split by mod, and you also ought to call this to delete a file. (note that deleting has other issues, see below).
Implements IVFS.
virtual Status VFS::Mount |
( |
const VfsPath & |
mountPoint, |
|
|
const OsPath & |
path, |
|
|
size_t |
flags, |
|
|
size_t |
priority |
|
) |
| |
|
inlinevirtual |
mount a directory into the VFS.
- Parameters
-
mountPoint | (will be created if it does not already exist) |
path | real directory path |
flags | |
priority | |
- Returns
- Status.
if files are encountered that already exist in the VFS (sub)directories, the most recent / highest priority/precedence version is preferred.
Note that the 'real directory' associated with a VFS Path will be relative to the highest priority subdirectory in the path, and that in case of equal priority, the order is undefined, and will depend on the exact order of populate() calls.
if files with archive extensions are seen, their contents are added as well.
Implements IVFS.