Utility class implementing a IFileInterface base class. More...

#include "murl_util_file_interface.h"

Inheritance diagram for Murl::Util::FileInterface:

Public Member Functions

 FileInterface ()
 The constructor.
 
virtual ~FileInterface ()
 The destructor.
 
virtual Bool GetAbsoluteName (const String &relativeName, IEnums::FileCategory category, String &absoluteName)
 Implementation of IFileInterface::GetAbsoluteName().
 
virtual Bool GetAllFileNames (const String &relativePath, IEnums::FileCategory category, StringArray &names)
 Implementation of IFileInterface::GetAllFileNames().
 
virtual Bool GetAllFolderNames (const String &relativePath, IEnums::FileCategory category, StringArray &names)
 Implementation of IFileInterface::GetAllFolderNames().
 
virtual IFileOpenFile (const String &name, IEnums::FileCategory category, IEnums::FileAccessMode mode, Bool createFolders)
 Implementation of IFileInterface::OpenFile().
 
virtual Bool CloseFile (IFile *&handle)
 Implementation of IFileInterface::CloseFile().
 
virtual Bool MapFileData (const String &name, IEnums::FileCategory category, ConstData &data)
 Implementation of IFileInterface::MapFileData().
 
virtual Bool UnmapFileData (ConstData &data)
 Implementation of IFileInterface::UnmapFileData().
 
- Public Member Functions inherited from Murl::IFileInterface
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...
 

Protected Member Functions

virtual Bool MapFile (const String &name, IEnums::FileCategory category, const UInt8 *&data, UInt64 &byteSize)=0
 Memory-map a read-only file. More...
 
virtual Bool UnmapFile (const UInt8 *data)=0
 Unmap a memory mapped file. More...
 
virtual Bool CreateFolder (const String &absolutePath)=0
 Create a folder. More...
 
virtual Bool GetAbsolutePath (IEnums::FileCategory category, String &absolutePath)=0
 Get the absolute folder path to a file category. More...
 

Detailed Description

Utility class implementing a IFileInterface base class.

Member Function Documentation

◆ MapFile()

virtual Bool Murl::Util::FileInterface::MapFile ( const String name,
IEnums::FileCategory  category,
const UInt8 *&  data,
UInt64 byteSize 
)
protectedpure virtual

Memory-map a read-only file.

Parameters
nameThe name of the file.
categoryThe category where the file reside.
dataThe file data pointer return value.
byteSizeThe byte size return value.
Returns
true if successful, if false the return values stay unchanged.

Implemented in Murl::Util::ToolsFileInterface.

◆ UnmapFile()

virtual Bool Murl::Util::FileInterface::UnmapFile ( const UInt8 data)
protectedpure virtual

Unmap a memory mapped file.

Parameters
dataThe mapped file data pointer.
Returns
true if successful.

Implemented in Murl::Util::ToolsFileInterface.

◆ CreateFolder()

virtual Bool Murl::Util::FileInterface::CreateFolder ( const String absolutePath)
protectedpure virtual

Create a folder.

Parameters
absolutePathThe path of the folder to create.
Returns
true if successful.

Implemented in Murl::Util::ToolsFileInterface.

◆ GetAbsolutePath()

virtual Bool Murl::Util::FileInterface::GetAbsolutePath ( IEnums::FileCategory  category,
String absolutePath 
)
protectedpure virtual

Get the absolute folder path to a file category.

Parameters
categoryThe category of the folder.
absolutePathThe path of the folder return value.
Returns
true if successful.

Implemented in Murl::Util::ToolsFileInterface.


The documentation for this class was generated from the following file:
  • murl_util_file_interface.h


Copyright © 2011-2018 Spraylight GmbH.