Utility class implementing the IFile interface. More...
#include "murl_util_file.h"
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... | |
Public Member Functions inherited from Murl::NonCopyable | |
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. | |
Detailed Description
Utility class implementing the IFile interface.
Constructor & Destructor Documentation
◆ File()
Murl::Util::File::File | ( | const String & | name, |
IEnums::FileAccessMode | accessMode | ||
) |
Constructor taking the file name and access mode.
- Parameters
-
name The file name. accessMode The access mode for opening the file.
◆ ~File()
|
override |
The destructor.
Close the file if open.
Member Function Documentation
◆ GetPosition()
|
overridevirtual |
Implementation of IFile::GetPosition().
- Returns
- The position of the file pointer in bytes.
Implements Murl::IFile.
◆ SetPosition()
|
overridevirtual |
Implementation of IFile::SetPosition().
- Parameters
-
position The position of the file pointer in bytes.
Implements Murl::IFile.
◆ GetSize()
|
overridevirtual |
◆ Read() [1/2]
Implementation of IFile::Read(void* data, UInt64 byteSize).
- Parameters
-
data The memory pointer to read the file into. byteSize The number of bytes to read.
- Returns
- The number of bytes read into the memory.
Implements Murl::IFile.
◆ Write() [1/2]
Implementation of IFile::Write(const void* data, UInt64 byteSize).
- Parameters
-
data The memory pointer to write into the file. byteSize The number of bytes to write.
- Returns
- The number of bytes written into the file.
Implements Murl::IFile.
◆ Read() [2/2]
Implementation of IFile::Read(Data& data).
- Parameters
-
data The data object to read the file into.
- Returns
- The number of bytes read into the data object.
Implements Murl::IFile.
◆ Write() [2/2]
Implementation of IFile::Write(const ConstData& data).
- Parameters
-
data The data object to write into the file.
- Returns
- The number of bytes written into the file.
Implements Murl::IFile.
◆ Open()
|
virtual |
Open the file.
Open with the name and access mode specified by the constructor.
- Returns
- true if successful.
◆ Close()
|
virtual |
Close the file.
- Returns
- true if successful.
The documentation for this class was generated from the following file:
- murl_util_file.h