Virtual File System Memory Files. More...
#include <deVFSMemoryFiles.h>
Public Member Functions | |
Constructors and Destructors | |
| deVFSMemoryFiles (decPath &rootPath) | |
| Creates a new virtual file system memory files with the given root path. | |
| virtual | ~deVFSMemoryFiles () |
| Cleans up the virtual file system memory files. | |
Management | |
| virtual bool | ExistsFile (decPath &path) |
| Determines if the specified file exists. | |
| virtual bool | CanReadFile (decPath &path) |
| Determines if the specified file can be read from. | |
| virtual bool | CanWriteFile (decPath &path) |
| Determines if the specified file can be written to. | |
| virtual bool | CanDeleteFile (decPath &path) |
| Determines if the specified file can be deleted. | |
| virtual decBaseFileReader * | OpenFileForReading (decPath &path) |
| Opens the specified file for reading. | |
| virtual decBaseFileWriter * | OpenFileForWriting (decPath &path) |
| Opens the specified file for writing. | |
| virtual void | DeleteFile (decPath &path) |
| Deletes the specified file. | |
| virtual void | SearchFilesMatching (dePathList &list, decPath &pattern) |
| Searches for all files and directories. | |
| virtual int | GetTypeOfFile (decPath &path) |
| Retrieves the type of the specified file. | |
Memory Files | |
| int | GetMemoryFileCount () const |
| Retrieves the number of memory files. | |
| decMemoryFile * | GetMemoryFileAt (int index) const |
| Retrieves the memory file at the given position. | |
| int | IndexOfMemoryFile (decMemoryFile *memoryFile) const |
| Retrieves the index of the memory file or -1 if not found. | |
| int | IndexOfMemoryFileWith (const char *path) const |
| Retrieves the index of the memory file with the given path or -1 if not found. | |
| bool | HasMemoryFile (decMemoryFile *memoryFile) const |
| Determines if a memory file exists. | |
| bool | HasMemoryFileWith (const char *path) const |
| Determines if a memory file with the given path exists. | |
| void | AddMemoryFile (decMemoryFile *memoryFile) |
| Adds a memory file. | |
| void | RemoveMemoryFile (decMemoryFile *memoryFile) |
| Removes a memory file. | |
| void | RemoveAllMemoryFiles () |
| Removes all memory files. | |
Virtual File System Memory Files.
Maps a list of memory files into the virtual file system. Memory files are chunks of data in memory representing files. This class is useful to add a small number of individual memory files to the virtual file system. Each memory file is an individual chunk of memory. For mapping a large block of memory into a virtual file system containing various files inside this memory block the block memory file class is better suited.
| deVFSMemoryFiles::deVFSMemoryFiles | ( | decPath & | rootPath ) |
Creates a new virtual file system memory files with the given root path.
| virtual deVFSMemoryFiles::~deVFSMemoryFiles | ( | ) | [virtual] |
Cleans up the virtual file system memory files.
| void deVFSMemoryFiles::AddMemoryFile | ( | decMemoryFile * | memoryFile ) |
Adds a memory file.
| virtual bool deVFSMemoryFiles::CanDeleteFile | ( | decPath & | path ) | [virtual] |
Determines if the specified file can be deleted.
The path is relative to the root path.
Implements deVFSContainer.
| virtual bool deVFSMemoryFiles::CanReadFile | ( | decPath & | path ) | [virtual] |
Determines if the specified file can be read from.
The path is relative to the root path. The result of this call is usually the same as of ExistsFile unless permissions prevent reading of an existing file.
Implements deVFSContainer.
| virtual bool deVFSMemoryFiles::CanWriteFile | ( | decPath & | path ) | [virtual] |
Determines if the specified file can be written to.
The path is relative to the root path. If a file has parent directories not existing yet they have to be created in a subsequent call to OpenFileForWriting. If this is the case return true only if the creation of the parent directories is also allowed in addition to creating a new file. If the file exists permission flags can prevent writing.
Implements deVFSContainer.
| virtual void deVFSMemoryFiles::DeleteFile | ( | decPath & | path ) | [virtual] |
| virtual bool deVFSMemoryFiles::ExistsFile | ( | decPath & | path ) | [virtual] |
Determines if the specified file exists.
The path is relative to the root path.
Implements deVFSContainer.
| decMemoryFile* deVFSMemoryFiles::GetMemoryFileAt | ( | int | index ) | const |
Retrieves the memory file at the given position.
| int deVFSMemoryFiles::GetMemoryFileCount | ( | ) | const [inline] |
Retrieves the number of memory files.
| virtual int deVFSMemoryFiles::GetTypeOfFile | ( | decPath & | path ) | [virtual] |
Retrieves the type of the specified file.
If the file does not exist an exception is thrown.
Implements deVFSContainer.
| bool deVFSMemoryFiles::HasMemoryFile | ( | decMemoryFile * | memoryFile ) | const |
Determines if a memory file exists.
| bool deVFSMemoryFiles::HasMemoryFileWith | ( | const char * | path ) | const |
Determines if a memory file with the given path exists.
| int deVFSMemoryFiles::IndexOfMemoryFile | ( | decMemoryFile * | memoryFile ) | const |
Retrieves the index of the memory file or -1 if not found.
| int deVFSMemoryFiles::IndexOfMemoryFileWith | ( | const char * | path ) | const |
Retrieves the index of the memory file with the given path or -1 if not found.
| virtual decBaseFileReader* deVFSMemoryFiles::OpenFileForReading | ( | decPath & | path ) | [virtual] |
Opens the specified file for reading.
The path is relative to the root path. If the file can not be found an exception is raised. Use the CanReadFile function to test if a file can be opened for reading.
Implements deVFSContainer.
| virtual decBaseFileWriter* deVFSMemoryFiles::OpenFileForWriting | ( | decPath & | path ) | [virtual] |
Opens the specified file for writing.
The path is relative to the root path. If the file can not be found an exception is raised. Use the CanWriteFile function to test if a file can be opened for writing. Not existing directories have to be created if the CanWriteFile function returns true for a file whose parent directory does not exist yet.
Implements deVFSContainer.
| void deVFSMemoryFiles::RemoveAllMemoryFiles | ( | ) |
Removes all memory files.
| void deVFSMemoryFiles::RemoveMemoryFile | ( | decMemoryFile * | memoryFile ) |
Removes a memory file.
| virtual void deVFSMemoryFiles::SearchFilesMatching | ( | dePathList & | list, |
| decPath & | pattern | ||
| ) | [virtual] |
Searches for all files and directories.
All found files and directories are added to the file listing.
Implements deVFSContainer.
1.7.2