The file access interface.
More...
#include <murl_i_file_interface.h>
The file access interface.
The file interface provides file access for locations on the target system specified by a IEnums::FileCategory.
|
| virtual Bool | FileExists (const String &name, IEnums::FileCategory category)=0 |
| | Check if a file exists. More...
|
| |
| virtual Bool | FolderExists (const String &name, IEnums::FileCategory category)=0 |
| | Check if a folder exists. More...
|
| |
| virtual Bool | GetAbsoluteName (const String &relativeName, IEnums::FileCategory category, String &absoluteName)=0 |
| | Get the absolute file name. More...
|
| |
| virtual Bool | GetAllFileNames (const String &relativePath, IEnums::FileCategory category, StringArray &names)=0 |
| | Get all file names inside a folder. More...
|
| |
| virtual Bool | GetAllFolderNames (const String &relativePath, IEnums::FileCategory category, StringArray &names)=0 |
| | Get all folder names inside a folder. More...
|
| |
| virtual IFile * | OpenFile (const String &name, IEnums::FileCategory category, IEnums::FileAccessMode mode, Bool createFolders)=0 |
| | Open a file. More...
|
| |
| virtual Bool | CloseFile (IFile *&handle)=0 |
| | Close a file. More...
|
| |
| virtual Bool | MapFileData (const String &name, IEnums::FileCategory category, ConstData &data)=0 |
| | Memory-map a read-only file. More...
|
| |
| virtual Bool | UnmapFileData (ConstData &data)=0 |
| | Unmap a memory mapped file. More...
|
| |
◆ FileExists()
Check if a file exists.
- Parameters
-
| name | The name of the file. |
| category | The category where the file reside. |
- Returns
- true if the file exists.
Implemented in Murl::Util::ToolsFileInterface.
◆ FolderExists()
Check if a folder exists.
- Parameters
-
| name | The name of the folder. |
| category | The category where the folder reside. |
- Returns
- true if the folder exists.
Implemented in Murl::Util::ToolsFileInterface.
◆ GetAbsoluteName()
Get the absolute file name.
- Parameters
-
| relativeName | The name of the file. |
| category | The category where the file reside. |
| absoluteName | The absolute file name return value. |
- Returns
- true if successful, if false the 'absoluteName' return value is unchanged.
Implemented in Murl::Util::FileInterface.
◆ GetAllFileNames()
Get all file names inside a folder.
- Parameters
-
| relativePath | The name of the folder. |
| category | The category where the folder reside. |
| names | The array of file names return value. |
- Returns
- true if successful, if false the 'names' return value is unchanged.
Implemented in Murl::Util::FileInterface.
◆ GetAllFolderNames()
Get all folder names inside a folder.
- Parameters
-
| relativePath | The name of the folder. |
| category | The category where the folder reside. |
| names | The array of folder names return value. |
- Returns
- true if successful, if false the 'names' return value is unchanged.
Implemented in Murl::Util::FileInterface.
◆ OpenFile()
Open a file.
- Parameters
-
| name | The name of the file. |
| category | The category where the file reside. |
| mode | The access mode for the file to open. |
| createFolders | Create the folders constained in file name if the folders do not exist. |
- Returns
- The file interface or null if not successful.
Implemented in Murl::Util::FileInterface.
◆ CloseFile()
| virtual Bool Murl::IFileInterface::CloseFile |
( |
IFile *& |
handle | ) |
|
|
pure virtual |
Close a file.
- Parameters
-
| handle | A reference to the file interface to close. After destruction the pointer is set to null. |
- Returns
- true if successful.
Implemented in Murl::Util::FileInterface.
◆ MapFileData()
Memory-map a read-only file.
- Parameters
-
| name | The name of the file. |
| category | The category where the file reside. |
| data | The file data object return value. |
- Returns
- true if successful, if false the 'data' return value is unchanged.
Implemented in Murl::Util::FileInterface.
◆ UnmapFileData()
| virtual Bool Murl::IFileInterface::UnmapFileData |
( |
ConstData & |
data | ) |
|
|
pure virtual |
Unmap a memory mapped file.
- Parameters
-
| data | The file data object to the memory mapped file. After unmapping the data object is empty. |
- Returns
- true if successful.
Implemented in Murl::Util::FileInterface.
The documentation for this interface was generated from the following file: