LittleFileSystem
Loading...
Searching...
No Matches
ntdv::VirtualFileSystem Class Reference

VirtualFileSystem class provides an interface for file system operations in a virtual file system. More...

#include <VirtualFileSystem.h>

Inheritance diagram for ntdv::VirtualFileSystem:
ntdv::IFileSystem LittleFileSystemImpl

Public Member Functions

FilePtr Open (const char *path, const char *mode, bool create) override
 
bool Exists (const char *path) override
 
bool Rename (const char *pathFrom, const char *pathTo) override
 
bool Remove (const char *path) override
 
bool CreateDirectory (const char *path) override
 
bool RemoveDirectory (const char *path) override
 
- Public Member Functions inherited from ntdv::IFileSystem
 IFileSystem ()
 Default constructor.
 
virtual ~IFileSystem ()
 Virtual destructor.
 
void Mountpoint (const char *mountpoint)
 
const char * Mountpoint () const
 

Friends

class VirtualFile
 Friend class declaration to allow VirtualFile to access protected members of VirtualFileSystem.
 

Additional Inherited Members

- Protected Attributes inherited from ntdv::IFileSystem
const char * _mountpoint
 Mount point of the file system.
 

Detailed Description

VirtualFileSystem class provides an interface for file system operations in a virtual file system.

Member Function Documentation

◆ CreateDirectory()

bool VirtualFileSystem::CreateDirectory ( const char * path)
overridevirtual

Create a directory

Parameters
path- path of the directory
Returns
true if successful, false otherwise

Implements ntdv::IFileSystem.

◆ Exists()

bool VirtualFileSystem::Exists ( const char * path)
overridevirtual

Check if a file exists

Parameters
path- path of the file
Returns
true if the file exists, false otherwise

Implements ntdv::IFileSystem.

◆ Open()

FilePtr VirtualFileSystem::Open ( const char * path,
const char * mode,
bool create )
overridevirtual

Open a file

Parameters
path- path of the file
mode- mode to open the file in
create- whether to create the file if it doesn't exist
Returns
a shared pointer to the opened file

Implements ntdv::IFileSystem.

◆ Remove()

bool VirtualFileSystem::Remove ( const char * path)
overridevirtual

Remove a file

Parameters
path- path of the file
Returns
true if successful, false otherwise

Implements ntdv::IFileSystem.

◆ RemoveDirectory()

bool VirtualFileSystem::RemoveDirectory ( const char * path)
overridevirtual

Remove a directory

Parameters
path- path of the directory
Returns
true if successful, false otherwise

Implements ntdv::IFileSystem.

◆ Rename()

bool VirtualFileSystem::Rename ( const char * pathFrom,
const char * pathTo )
overridevirtual

Rename a file

Parameters
pathFrom- current path of the file
pathTo- new path of the file
Returns
true if successful, false otherwise

Implements ntdv::IFileSystem.

Friends And Related Symbol Documentation

◆ VirtualFile

friend class VirtualFile
friend

Friend class declaration to allow VirtualFile to access protected members of VirtualFileSystem.


The documentation for this class was generated from the following files: