Defined in:Opens a file.
FileResult OpenFile(const char *name, FileOpenMode mode = kFileReadOnly);
||A pointer to the name of the file. If a path name is specified, it is interpreted relative to the application. Directory names preceding a file name or another directory name should be followed by a single forward slash character (/).|
||Specifies how the file should be opened.|
OpenFilefunction opens the file specified by the
modeparameter specifies one of the following open modes.
||The file is to be opened with read-only access.|
||The file is to be opened with read/write access.|
||A new file is to be created and opened with read/write access. Any existing file with the same name will be overwritten.|
kFileOkay. Otherwise, one of the following file result codes is returned.
||The file could not be opened because the operating system returned an error.|
||The file could not be created because the operating system returned an error.|