The File class is used to easily access files on the disk or in .pak files. More...
Static Public Member Functions | |
static bool | Exists (string path) |
Checks if the file at the specified path exists on disk or in a .pak file. More... | |
static byte [] | ReadAllBytes (string path) |
Reads all the bytes from start to finish of the specified file on the disk or in a .pak file. Throws a FileNotFoundException if the file doesn't exist. More... | |
static void | Close (CryPakFile handle) |
Closes the filehandle handle . More... | |
static uint | Read (CryPakFile handle, byte[] buffer, uint length) |
Read raw data into buffer from a file on the disk or in a .pak file, without endian conversion. More... | |
static CryPakFile | Open (string path, FileMode mode) |
Open the file at the specified path. Use mode to specify how to open the file. More... | |
static uint | GetSize (CryPakFile handle) |
Get the file size of file belonging to handle . More... | |
The File class is used to easily access files on the disk or in .pak files.
|
inline static |
Closes the filehandle handle .
handle | The file handle. |
|
inline static |
Checks if the file at the specified path exists on disk or in a .pak file.
true
, if a file exists, false
otherwise.path | Path to the file. |
|
inline static |
Get the file size of file belonging to handle .
handle | Filehandle of the file. |
|
inline static |
Open the file at the specified path. Use mode to specify how to open the file.
path | Path to the specified file. |
mode | The FileMode to use to open the file. |
|
inline static |
Read raw data into buffer from a file on the disk or in a .pak file, without endian conversion.
handle | Handle to the file. |
buffer | Buffer that contains the read data. |
length | Length of the data to be read. |
|
inline static |
Reads all the bytes from start to finish of the specified file on the disk or in a .pak file. Throws a FileNotFoundException
if the file doesn't exist.
path | Path to the file. |