#include <ModuleFileManager.h>
Inherits ModuleBase.
|
static CoreRawBuffer * | LoadFile (const char *pFilename, u64 &filelength, u64 startOffset=0, unsigned int trailing_zero=0) |
|
static CoreRawBuffer * | LoadFileAsCharString (const char *pFilename, u64 &filelength, u8 charSize, u64 startOffset=0) |
| load a file and add a zero at the end of the char buffer More...
|
|
static bool | SaveFile (const char *filename, u8 *data, u64 length) |
|
static bool | RemoveFile (const char *filename) |
|
static bool | CoreCopyFile (const char *sourceFilename, const char *destFileName, int buffLen=2048) |
|
static bool | CoreCopyFile (SP< FileHandle > source, SP< FileHandle > dest, int buffLen=2048) |
|
static bool | CoreCopyPartOfFile (SP< FileHandle > lsource, u64 lstart, u64 lsize, SP< FileHandle > ldest, int lbuffLen=2048) |
|
Manage classes related to pathes and file reading / writing.
◆ CoreCopyFile() [1/2]
bool ModuleFileManager::CoreCopyFile |
( |
const char * |
sourceFilename, |
|
|
const char * |
destFileName, |
|
|
int |
buffLen = 2048 |
|
) |
| |
|
static |
copy a binary file
- Parameters
-
sourceFilename | name of the file to copy |
destFileName | name of the file to create or overwrite |
- Returns
- true if file was copied
◆ CoreCopyFile() [2/2]
bool ModuleFileManager::CoreCopyFile |
( |
SP< FileHandle > |
source, |
|
|
SP< FileHandle > |
dest, |
|
|
int |
buffLen = 2048 |
|
) |
| |
|
static |
copy a binary file
- Parameters
-
source | handle of source file |
dest | handle of dest file |
- Returns
- true if file was copied
◆ CoreCopyPartOfFile()
bool ModuleFileManager::CoreCopyPartOfFile |
( |
SP< FileHandle > |
lsource, |
|
|
u64 |
lstart, |
|
|
u64 |
lsize, |
|
|
SP< FileHandle > |
ldest, |
|
|
int |
lbuffLen = 2048 |
|
) |
| |
|
static |
copy a part of a file
- Parameters
-
source | handle of source file |
dest | handle of dest file |
- Returns
- true if file was copied
◆ Init()
◆ LoadFile()
CoreRawBuffer * ModuleFileManager::LoadFile |
( |
const char * |
pFilename, |
|
|
u64 & |
filelength, |
|
|
u64 |
startOffset = 0 , |
|
|
unsigned int |
trailing_zero = 0 |
|
) |
| |
|
static |
load a binary file
- Parameters
-
pFilename | name of the file |
filelength | length of the file |
startOffset | offset from the start of the file |
- Returns
- a pointer on the loaded file in memory
- Note
- returned pointer must be deleted with delete[] after use
◆ LoadFileAsCharString()
CoreRawBuffer * ModuleFileManager::LoadFileAsCharString |
( |
const char * |
pFilename, |
|
|
u64 & |
filelength, |
|
|
u8 |
charSize, |
|
|
u64 |
startOffset = 0 |
|
) |
| |
|
static |
load a file and add a zero at the end of the char buffer
load a text file in a string, add a 0 character at the end of the char buffer
- Parameters
-
pFilename | name of the file |
filelength | length of the file |
startOffset | offset from the start of the file |
- Returns
- a pointer on the loaded file in memory
- Note
- returned pointer must be deleted with delete[] after use
◆ RemoveFile()
bool ModuleFileManager::RemoveFile |
( |
const char * |
filename | ) |
|
|
static |
remove given file
- Parameters
-
filename | name of the file to delete (remove) |
- Returns
- true if the file was successfully removed
◆ SaveFile()
bool ModuleFileManager::SaveFile |
( |
const char * |
filename, |
|
|
u8 * |
data, |
|
|
u64 |
length |
|
) |
| |
|
static |
save a binary file
- Parameters
-
filename | name of the file to create (or overwrite) |
data | binary data to save |
length | length of the data |
- Returns
- true if data was written into specified file, false otherwise
The documentation for this class was generated from the following files:
- G:/Projects/Github/kigs/framework/FileManager/Headers/ModuleFileManager.h
- G:/Projects/Github/kigs/framework/FileManager/Sources/ModuleFileManager.cpp