The system file access class.
More...
#include <murl_system_file.h>
The system file access class.
◆ ~File()
virtual Murl::System::File::~File |
( |
| ) |
|
|
virtual |
The destructor.
Close the file if open.
◆ GetFiles()
Get all file names from a specified path.
- Parameters
-
path | The path to examine the files. |
- Returns
- A string array containing all files names.
◆ FileExists()
static Bool Murl::System::File::FileExists |
( |
const String & |
path | ) |
|
|
static |
Check if a file exists.
- Parameters
-
path | The path and filename. |
- Returns
- true if the file exists.
◆ DeleteFile()
static Bool Murl::System::File::DeleteFile |
( |
const String & |
path | ) |
|
|
static |
Delete a file.
- Parameters
-
path | The path to the file to delete. |
- Returns
- true if successful.
◆ MoveFile()
static Bool Murl::System::File::MoveFile |
( |
const String & |
oldPath, |
|
|
const String & |
newPath |
|
) |
| |
|
static |
Move/rename a file.
- Parameters
-
oldPath | The current path to the file to move. |
newPath | The new path of the file. |
- Returns
- true if successful.
◆ GetFileSize()
static UInt64 Murl::System::File::GetFileSize |
( |
const String & |
path | ) |
|
|
static |
Get the size of a file in bytes.
- Parameters
-
path | The path to the file to check. |
- Returns
- The file's size in bytes.
◆ GetFolders()
Get all folder names from a specified path.
- Parameters
-
path | The path to examine the folders. |
- Returns
- A string array containing all folder names.
◆ FolderExists()
static Bool Murl::System::File::FolderExists |
( |
const String & |
path | ) |
|
|
static |
Check if a folder exists.
- Parameters
-
path | The path and the folder. |
- Returns
- true if the folder exists.
◆ CreateFolder()
static Bool Murl::System::File::CreateFolder |
( |
const String & |
path | ) |
|
|
static |
Create a folder.
- Parameters
-
path | The path and the folder to create. |
- Returns
- true if successful.
◆ DeleteFolder()
static Bool Murl::System::File::DeleteFolder |
( |
const String & |
path, |
|
|
Bool |
recursively |
|
) |
| |
|
static |
Delete a folder.
- Parameters
-
path | The path and the folder to delete. |
recursively | If true, the folder and all contents are deleted. If false, the function fails when the folder is not empty. |
- Returns
- true if successful.
◆ MoveFolder()
static Bool Murl::System::File::MoveFolder |
( |
const String & |
oldPath, |
|
|
const String & |
newPath |
|
) |
| |
|
static |
Move/rename a folder.
- Parameters
-
oldPath | The current path to the folder to move. |
newPath | The new path of the folder. |
- Returns
- true if successful.
◆ GetItemCreationTime()
static Bool Murl::System::File::GetItemCreationTime |
( |
const String & |
path, |
|
|
Time & |
time |
|
) |
| |
|
static |
Get the creation time of a file or folder.
- Parameters
-
path | The path to the file or folder to query. |
time | A reference to a time object to receive the creation time. |
- Returns
- true if successful.
◆ GetItemModificationTime()
static Bool Murl::System::File::GetItemModificationTime |
( |
const String & |
path, |
|
|
Time & |
time |
|
) |
| |
|
static |
Get the time a file or folder was most recently modified.
- Parameters
-
path | The path to the file or folder to query. |
time | A reference to a time object to receive the last modification time. |
- Returns
- true if successful.
◆ Open()
Open a file.
- Parameters
-
fileName | The file name to open. |
mode | The access mode for opening the file. |
- Returns
- true if successful.
◆ Close()
Bool Murl::System::File::Close |
( |
| ) |
|
Close the file.
- Returns
- true if successful.
◆ IsOpen()
Bool Murl::System::File::IsOpen |
( |
| ) |
const |
Check if the file is open.
- Returns
- true if the file is open.
◆ GetSize()
UInt64 Murl::System::File::GetSize |
( |
| ) |
const |
Get the size of the file.
- Returns
- The byte size of the file.
◆ GetPosition()
UInt64 Murl::System::File::GetPosition |
( |
| ) |
const |
Get the file pointer position.
- Returns
- The file pointer position in bytes.
◆ SetPosition()
void Murl::System::File::SetPosition |
( |
UInt64 |
position | ) |
|
Set the file pointer position.
- Parameters
-
position | The file pointer position in bytes. |
◆ Read()
UInt64 Murl::System::File::Read |
( |
void * |
data, |
|
|
UInt64 |
byteSize |
|
) |
| |
Read from the file at the current file pointer position.
- Parameters
-
data | Pointer to the memory to read into. |
byteSize | The byte size of the memory. |
- Returns
- The number of bytes read from the file.
◆ Write()
UInt64 Murl::System::File::Write |
( |
const void * |
data, |
|
|
UInt64 |
byteSize |
|
) |
| |
Write to the file at the current file pointer position.
- Parameters
-
data | Pointer to the memory to read from. |
byteSize | The byte size of the memory. |
- Returns
- The number of bytes written to the file.
◆ mHandle
FileHandle* Murl::System::File::mHandle |
|
protected |
The anonymous file handle for internal use only.
◆ mMode
The mode used for opening the file.
The documentation for this class was generated from the following file: