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

FileSystem class provides a high-level interface for file system operations. More...

#include <FileSystem.h>

Inheritance diagram for ntdv::FileSystem:
ntdv::LittleFileSystem

Public Member Functions

 FileSystem (FileSystemPtr impl)
 
FileStream Open (const char *path, const char *mode=FILE_READ, bool create=false) const
 
FileStream Open (const String &path, const char *mode=FILE_READ, bool create=false) const
 
bool Exists (const char *path) const
 
bool Exists (const String &path) const
 
bool Remove (const char *path) const
 
bool Remove (const String &path) const
 
bool Rename (const char *pathFrom, const char *pathTo) const
 
bool Rename (const String &pathFrom, const String &pathTo) const
 
bool CreateDirectory (const char *path) const
 
bool CreateDirectory (const String &path) const
 
bool RemoveDirectory (const char *path) const
 
bool RemoveDirectory (const String &path) const
 
const char * Mountpoint () const
 

Protected Attributes

FileSystemPtr _impl
 Shared pointer to an IFileSystem object.
 

Detailed Description

FileSystem class provides a high-level interface for file system operations.

Constructor & Destructor Documentation

◆ FileSystem()

ntdv::FileSystem::FileSystem ( FileSystemPtr impl)
inline

Constructor

Parameters
impl- shared pointer to an IFileSystem object

Member Function Documentation

◆ CreateDirectory() [1/2]

bool FileSystem::CreateDirectory ( const char * path) const

Create a directory

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

◆ CreateDirectory() [2/2]

bool FileSystem::CreateDirectory ( const String & path) const

Create a directory

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

◆ Exists() [1/2]

bool FileSystem::Exists ( const char * path) const

Check if a file exists

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

◆ Exists() [2/2]

bool FileSystem::Exists ( const String & path) const

Check if a file exists

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

◆ Mountpoint()

const char * FileSystem::Mountpoint ( ) const

Get the mount point of the file system

Returns
the mount point

◆ Open() [1/2]

FileStream FileSystem::Open ( const char * path,
const char * mode = FILE_READ,
bool create = false ) const

Open a file

Parameters
path- path of the file
mode- mode to open the file in (default is read mode)
create- whether to create the file if it doesn't exist (default is false)
Returns
a FileStream object for the opened file

◆ Open() [2/2]

FileStream FileSystem::Open ( const String & path,
const char * mode = FILE_READ,
bool create = false ) const

Open a file

Parameters
path- path of the file
mode- mode to open the file in (default is read mode)
create- whether to create the file if it doesn't exist (default is false)
Returns
a FileStream object for the opened file

◆ Remove() [1/2]

bool FileSystem::Remove ( const char * path) const

Remove a file

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

◆ Remove() [2/2]

bool FileSystem::Remove ( const String & path) const

Remove a file

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

◆ RemoveDirectory() [1/2]

bool FileSystem::RemoveDirectory ( const char * path) const

Remove a directory

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

◆ RemoveDirectory() [2/2]

bool FileSystem::RemoveDirectory ( const String & path) const

Remove a directory

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

◆ Rename() [1/2]

bool FileSystem::Rename ( const char * pathFrom,
const char * pathTo ) const

Rename a file

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

◆ Rename() [2/2]

bool FileSystem::Rename ( const String & pathFrom,
const String & pathTo ) const

Rename a file

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

Member Data Documentation

◆ _impl

FileSystemPtr ntdv::FileSystem::_impl
protected

Shared pointer to an IFileSystem object.


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