Utility class implementing the IFileInterface class. More...

#include "murl_util_tools_file_interface.h"

Inheritance diagram for Murl::Util::ToolsFileInterface:

Public Member Functions

 ToolsFileInterface ()
 The default constructor.
 
 ~ToolsFileInterface () override
 The destructor.
 
Bool FileExists (const String &name, IEnums::FileCategory category) override
 Implementation of IFileInterface::FileExists(). More...
 
Bool FolderExists (const String &name, IEnums::FileCategory category) override
 Implementation of IFileInterface::FolderExists(). More...
 
- Public Member Functions inherited from Murl::Util::FileInterface
 FileInterface ()
 The constructor.
 
 ~FileInterface () override
 The destructor.
 
Bool GetAbsoluteName (const String &relativeName, IEnums::FileCategory category, String &absoluteName) override
 Implementation of IFileInterface::GetAbsoluteName(). More...
 
Bool GetAllFileNames (const String &relativePath, IEnums::FileCategory category, StringArray &names) override
 Implementation of IFileInterface::GetAllFileNames(). More...
 
Bool GetAllFolderNames (const String &relativePath, IEnums::FileCategory category, StringArray &names) override
 Implementation of IFileInterface::GetAllFolderNames(). More...
 
IFileOpenFile (const String &name, IEnums::FileCategory category, IEnums::FileAccessMode mode, Bool createFolders) override
 Implementation of IFileInterface::OpenFile(). More...
 
Bool CloseFile (IFile *&handle) override
 Implementation of IFileInterface::CloseFile(). More...
 
Bool MapFileData (const String &name, IEnums::FileCategory category, ConstData &data) override
 Implementation of IFileInterface::MapFileData(). More...
 
Bool UnmapFileData (ConstData &data) override
 Implementation of IFileInterface::UnmapFileData(). More...
 

Protected Member Functions

Bool MapFile (const String &name, IEnums::FileCategory category, const UInt8 *&data, UInt64 &byteSize) override
 Implementation of FileInterface::MapFile(). More...
 
Bool UnmapFile (const UInt8 *data) override
 Implementation of FileInterface::UnmapFile(). More...
 
Bool CreateFolder (const String &absolutePath) override
 Implementation of FileInterface::CreateFolder(). More...
 
Bool GetAbsolutePath (IEnums::FileCategory category, String &absolutePath) override
 Implementation of FileInterface::GetAbsolutePath(). More...
 

Protected Attributes

Index< const UInt8 * > mMappedFiles
 The mapped files memory pointer storage.
 

Detailed Description

Utility class implementing the IFileInterface class.

The tools file interface class is intend for tools development and supports the file category IEnums::FILE_CATEGORY_CURRENT and IEnums::FILE_CATEGORY_ROOT only.

Member Function Documentation

◆ FileExists()

Bool Murl::Util::ToolsFileInterface::FileExists ( const String name,
IEnums::FileCategory  category 
)
overridevirtual

Implementation of IFileInterface::FileExists().

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

Implements Murl::IFileInterface.

◆ FolderExists()

Bool Murl::Util::ToolsFileInterface::FolderExists ( const String name,
IEnums::FileCategory  category 
)
overridevirtual

Implementation of IFileInterface::FolderExists().

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

Implements Murl::IFileInterface.

◆ MapFile()

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

Implementation of FileInterface::MapFile().

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.

Implements Murl::Util::FileInterface.

◆ UnmapFile()

Bool Murl::Util::ToolsFileInterface::UnmapFile ( const UInt8 data)
overrideprotectedvirtual

Implementation of FileInterface::UnmapFile().

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

Implements Murl::Util::FileInterface.

◆ CreateFolder()

Bool Murl::Util::ToolsFileInterface::CreateFolder ( const String absolutePath)
overrideprotectedvirtual

Implementation of FileInterface::CreateFolder().

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

Implements Murl::Util::FileInterface.

◆ GetAbsolutePath()

Bool Murl::Util::ToolsFileInterface::GetAbsolutePath ( IEnums::FileCategory  category,
String absolutePath 
)
overrideprotectedvirtual

Implementation of FileInterface::GetAbsolutePath().

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

Implements Murl::Util::FileInterface.


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


Copyright © 2011-2024 Spraylight GmbH.