fsIOOpen
The fsIOOpen function is used to open a file for reading/writing/editing.
Syntax
FsIOFile fsIOOpen(
char* path,
FsIOOpenFlags flags,
FsIOFileOpenCallback callback,
void* pUserData
);
Members
Parameters | Description |
---|---|
path |
Path to the file being opened. Files must exist within the package using the module to be able to be read, however please note that some files may be encrypted or inaccessible, as explained here: Inaccessible Files
You can use the following to target files from the package folder root or the persistent storage root:
|
flags |
This is a bit-flag defining how the file should be opened. Please see FsIOOpenFlags for details. |
callback |
Callback (FsIOFileOpenCallback ) that is sent when the open operation is finished. |
pUserData |
Pointer given to the callback to identify the function call. |
Return Values
An ID pointer representing the file being opened.
Remarks
This function is non-blocking: it will not wait for the file to be opened to pass to the next line of code. Errors can be checked for using the fsIOGetLastError
function.