Murl::IFileInterface Interface Referenceabstract

The file access interface. More...

#include "murl_i_file_interface.h"

Inheritance diagram for Murl::IFileInterface:

Public Member Functions

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 IFileOpenFile (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...
 

Detailed Description

The file access interface.

The file interface provides file access for locations on the target system specified by a IEnums::FileCategory.

Member Function Documentation

◆ FileExists()

virtual Bool Murl::IFileInterface::FileExists ( const String name,
IEnums::FileCategory  category 
)
pure virtual

Check if a file exists.

Parameters
nameThe name of the file.
categoryThe category where the file reside.
Returns
true if the file exists.

Implemented in Murl::Util::ToolsFileInterface.

◆ FolderExists()

virtual Bool Murl::IFileInterface::FolderExists ( const String name,
IEnums::FileCategory  category 
)
pure virtual

Check if a folder exists.

Parameters
nameThe name of the folder.
categoryThe category where the folder reside.
Returns
true if the folder exists.

Implemented in Murl::Util::ToolsFileInterface.

◆ GetAbsoluteName()

virtual Bool Murl::IFileInterface::GetAbsoluteName ( const String relativeName,
IEnums::FileCategory  category,
String absoluteName 
)
pure virtual

Get the absolute file name.

Parameters
relativeNameThe name of the file.
categoryThe category where the file reside.
absoluteNameThe absolute file name return value.
Returns
true if successful, if false the 'absoluteName' return value is unchanged.

Implemented in Murl::Util::FileInterface.

◆ GetAllFileNames()

virtual Bool Murl::IFileInterface::GetAllFileNames ( const String relativePath,
IEnums::FileCategory  category,
StringArray names 
)
pure virtual

Get all file names inside a folder.

Parameters
relativePathThe name of the folder.
categoryThe category where the folder reside.
namesThe array of file names return value.
Returns
true if successful, if false the 'names' return value is unchanged.

Implemented in Murl::Util::FileInterface.

◆ GetAllFolderNames()

virtual Bool Murl::IFileInterface::GetAllFolderNames ( const String relativePath,
IEnums::FileCategory  category,
StringArray names 
)
pure virtual

Get all folder names inside a folder.

Parameters
relativePathThe name of the folder.
categoryThe category where the folder reside.
namesThe array of folder names return value.
Returns
true if successful, if false the 'names' return value is unchanged.

Implemented in Murl::Util::FileInterface.

◆ OpenFile()

virtual IFile* Murl::IFileInterface::OpenFile ( const String name,
IEnums::FileCategory  category,
IEnums::FileAccessMode  mode,
Bool  createFolders 
)
pure virtual

Open a file.

Parameters
nameThe name of the file.
categoryThe category where the file reside.
modeThe access mode for the file to open.
createFoldersCreate 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
handleA 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()

virtual Bool Murl::IFileInterface::MapFileData ( const String name,
IEnums::FileCategory  category,
ConstData data 
)
pure virtual

Memory-map a read-only file.

Parameters
nameThe name of the file.
categoryThe category where the file reside.
dataThe 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
dataThe 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:
  • murl_i_file_interface.h


Copyright © 2011-2024 Spraylight GmbH.