Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IUnbufferedFile::open ( const P6WCHAR pwszFilename,
P6FILEFLAGS  fFlags,
P6FILEMODE  perms 
)
pure virtual

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
pwszFilenameA pointer to a NULL terminated const P6WCHAR string containing the pathname of the file to create or open.
fFlagsThe 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
permsThe file mode to set on the created file.
See Also
P6FILEMODE
Returns
SuccessP6R::eOk 
FailureP6R::eNotInitializedThe initialize() was not called successfully before calling this method.
P6R::eInvalidArgpwszFilename was NULL or fFlags was zero.
P6R::eNotFoundThe specified file was not found.
P6R::ePathNotFoundAn element of the specified path does not exist.
P6R::eNoSystemHandlesThe system has run out of file handles and can not fulfill this request.