Creates or opens the specified file using the the supplied flags and permissions.
You can open stdout/stderr/stdin by passing the strings "stdout", "stderr" or "stdin" to the open command.
- Note
- File permissions are curently ignored on some operating systems. They MUST still be specified for future compatability. If P6FP_DEFAULT is specified then the created file will have read/write permissions for the current user only (P6FILE_UREAD|P6FILE_UWRITE).
- Parameters
-
pwszFilename | A pointer to a NULL terminated const P6WCHAR string containing the pathname of the file to create or open. |
fFlags | The file open/creation flags. See P6R::P6FILEFLAGS. This MUST be a combination of P6R::P6FILE_READ and/or P6R::P6FILE_WRITE and one of the following:
-
P6R::P6FILE_CREATENEW
-
P6R::P6FILE_CREATEALWAYS
-
P6R::P6FILE_OPENALWAYS
-
P6R::P6FILE_OPENEXISTING
-
P6R::P6FILE_TRUNCEXISTING
-
P6R::P6FILE_APPEND
|
perms | The file mode to set on the created file. |
- See Also
- P6FILEMODE
- Returns
Success | P6R::eOk | |
Failure | P6R::eNotInitialized | The initialize() was not called successfully before calling this method. |
P6R::eInvalidArg | pwszFilename was NULL or fFlags was zero. |
P6R::eNotFound | The specified file was not found. |
P6R::ePathNotFound | An element of the specified path does not exist. |
P6R::eNoSystemHandles | The system has run out of file handles and can not fulfill this request. |