![]() |
Murl Engine API
Version 2024.1
|
Utility class implementing the IFile interface. More...
#include <murl_util_file.h>
Utility class implementing the IFile interface.
Public Member Functions | |
File (const String &name, IEnums::FileAccessMode accessMode) | |
Constructor taking the file name and access mode. More... | |
~File () override | |
The destructor. More... | |
UInt64 | GetPosition () override |
Implementation of IFile::GetPosition(). More... | |
void | SetPosition (UInt64 position) override |
Implementation of IFile::SetPosition(). More... | |
UInt64 | GetSize () override |
Implementation of IFile::GetSize(). More... | |
UInt64 | Read (void *data, UInt64 byteSize) override |
Implementation of IFile::Read(void* data, UInt64 byteSize). More... | |
UInt64 | Write (const void *data, UInt64 byteSize) override |
Implementation of IFile::Write(const void* data, UInt64 byteSize). More... | |
UInt64 | Read (Data &data) override |
Implementation of IFile::Read(Data& data). More... | |
UInt64 | Write (const ConstData &data) override |
Implementation of IFile::Write(const ConstData& data). More... | |
virtual Bool | Open () |
Open the file. More... | |
virtual Bool | Close () |
Close the file. More... | |
![]() | |
NonCopyable ()=default | |
The default constructor. | |
Protected Attributes | |
String | mName |
The file name storage. | |
IEnums::FileAccessMode | mAccessMode |
The access mode storage. | |
System::File | mFile |
The system file object. | |
Murl::Util::File::File | ( | const String & | name, |
IEnums::FileAccessMode | accessMode | ||
) |
Constructor taking the file name and access mode.
name | The file name. |
accessMode | The access mode for opening the file. |
|
override |
The destructor.
Close the file if open.
|
overridevirtual |
Implementation of IFile::GetPosition().
Implements Murl::IFile.
|
overridevirtual |
Implementation of IFile::SetPosition().
position | The position of the file pointer in bytes. |
Implements Murl::IFile.
|
overridevirtual |
Implementation of IFile::Read(void* data, UInt64 byteSize).
data | The memory pointer to read the file into. |
byteSize | The number of bytes to read. |
Implements Murl::IFile.
Implementation of IFile::Write(const void* data, UInt64 byteSize).
data | The memory pointer to write into the file. |
byteSize | The number of bytes to write. |
Implements Murl::IFile.
Implementation of IFile::Read(Data& data).
data | The data object to read the file into. |
Implements Murl::IFile.
Implementation of IFile::Write(const ConstData& data).
data | The data object to write into the file. |
Implements Murl::IFile.
|
virtual |
Open the file.
Open with the name and access mode specified by the constructor.
|
virtual |
Close the file.