|
| 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 () |
|
virtual Status | Mount (const VfsPath &mountPoint, const OsPath &path, size_t flags=0, size_t priority=0)=0 |
| mount a directory into the VFS. More...
|
|
virtual Status | GetFileInfo (const VfsPath &pathname, CFileInfo *pfileInfo) const =0 |
| Retrieve information about a file (similar to POSIX stat). More...
|
|
virtual Status | GetFilePriority (const VfsPath &pathname, size_t *ppriority) const =0 |
| Retrieve mount priority for a file. More...
|
|
virtual Status | GetDirectoryEntries (const VfsPath &path, CFileInfos *fileInfos, DirectoryNames *subdirectoryNames) const =0 |
| 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)=0 |
| Create a file with the given contents. More...
|
|
virtual Status | LoadFile (const VfsPath &pathname, std::shared_ptr< u8 > &fileContents, size_t &size)=0 |
| Read an entire file into memory. More...
|
|
virtual std::wstring | TextRepresentation () const =0 |
|
virtual Status | GetOriginalPath (const VfsPath &filename, OsPath &loadedPathname)=0 |
| Retrieve the POSIX pathname a VFS file was loaded from. More...
|
|
virtual Status | GetRealPath (const VfsPath &pathname, OsPath &realPathname, bool createMissingDirectories=true)=0 |
| Retrieve the real (POSIX) pathname underlying a VFS file. More...
|
|
virtual Status | GetDirectoryRealPath (const VfsPath &pathname, OsPath &realPathname, bool createMissingDirectories=true)=0 |
| Retrieve the real (POSIX) pathname underlying a VFS directory. More...
|
|
virtual Status | GetVirtualPath (const OsPath &realPathname, VfsPath &pathname)=0 |
| retrieve the VFS pathname that corresponds to a real file. More...
|
|
virtual Status | RemoveFile (const VfsPath &pathname)=0 |
| remove file from the virtual directory listing. More...
|
|
virtual Status | RepopulateDirectory (const VfsPath &path)=0 |
| request the directory be re-populated when it is next accessed. More...
|
|
virtual void | Clear ()=0 |
| empty the contents of the filesystem. More...
|
|
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.