LittleFileSystem
Loading...
Searching...
No Matches
ntdv::IFileSystem Class Referenceabstract

Interface for a file system. More...

#include <IFileSystem.h>

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

Public Member Functions

 IFileSystem ()
 Default constructor.
 
virtual ~IFileSystem ()
 Virtual destructor.
 
virtual FilePtr Open (const char *path, const char *mode, bool create)=0
 
virtual bool Exists (const char *path)=0
 
virtual bool Rename (const char *pathFrom, const char *pathTo)=0
 
virtual bool Remove (const char *path)=0
 
virtual bool CreateDirectory (const char *path)=0
 
virtual bool RemoveDirectory (const char *path)=0
 
void Mountpoint (const char *mountpoint)
 
const char * Mountpoint () const
 

Protected Attributes

const char * _mountpoint
 Mount point of the file system.
 

Detailed Description

Interface for a file system.

Constructor & Destructor Documentation

◆ IFileSystem()

ntdv::IFileSystem::IFileSystem ( )
inline

Default constructor.

◆ ~IFileSystem()

virtual ntdv::IFileSystem::~IFileSystem ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

◆ CreateDirectory()

virtual bool ntdv::IFileSystem::CreateDirectory ( const char * path)
pure virtual

Create a directory

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

Implemented in ntdv::VirtualFileSystem.

◆ Exists()

virtual bool ntdv::IFileSystem::Exists ( const char * path)
pure virtual

Check if a file exists

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

Implemented in LittleFileSystemImpl, and ntdv::VirtualFileSystem.

◆ Mountpoint() [1/2]

const char * IFileSystem::Mountpoint ( ) const

Get the mount point of the file system

Returns
the mount point

◆ Mountpoint() [2/2]

void IFileSystem::Mountpoint ( const char * mountpoint)

Set the mount point of the file system

Parameters
mountpoint- the mount point

◆ Open()

virtual FilePtr ntdv::IFileSystem::Open ( const char * path,
const char * mode,
bool create )
pure virtual

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

Implemented in ntdv::VirtualFileSystem.

◆ Remove()

virtual bool ntdv::IFileSystem::Remove ( const char * path)
pure virtual

Remove a file

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

Implemented in ntdv::VirtualFileSystem.

◆ RemoveDirectory()

virtual bool ntdv::IFileSystem::RemoveDirectory ( const char * path)
pure virtual

Remove a directory

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

Implemented in ntdv::VirtualFileSystem.

◆ Rename()

virtual bool ntdv::IFileSystem::Rename ( const char * pathFrom,
const char * pathTo )
pure virtual

Rename a file

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

Implemented in ntdv::VirtualFileSystem.

Member Data Documentation

◆ _mountpoint

const char* ntdv::IFileSystem::_mountpoint
protected

Mount point of the file system.


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