FileOpener::OpenFile

FileOpener::OpenFile
virtual File* OpenFile(const char* purl, int flags = FileConstants::Open_Read|FileConstants::Open_Buffered, int mode = FileConstants::Mode_ReadWrite);
Description

OpenFile opens a file based on the specified path, returning a File object. The default implementation uses a buffer-wrapped SysFile, but only if SF_ENABLE_SYSFILE is defined. If SF_ENABLE_SYSFILE is not defined, the default implementation will always fail, so the user is required to override this function for successful loading. 

OpenFile will usually be called when Loader needs to open the new GFX/SWF file, such as in response to the user calling Loader::CreateMovie. This function is also used to open referenced image files, imported SWF/GFX files, or files requested by loadMovie from ActionScript.

Parameters
Parameters 
Description 
const char* purl 
The url to the file. This should be encoded as UTF-8 to support international file names. 
int flags = FileConstants::Open_Read|FileConstants::Open_Buffered 
Flags set for opening the file with buffering. See FileConstants::OpenFlags
int mode = FileConstants::Mode_ReadWrite 
Modes set for file operations. See FileConstants::Modes
Return Value

A File pointer to the opened file, or 0 value for failure. The caller of the function is responsible for releasing the File interface.