NWCreateFile(3nw)
NWCreateFile --
creates a file in the DOS namespace
Synopsis
#include <nwfile.h>
or
#include <nwcalls.h>
NWCCODE N_API NWCreateFile
(NWCONN_HANDLE conn,
NWDIR_HANDLE dirHandle,
pnstr8 fileName,
nuint8 fileAttrs,
pNWFILE_HANDLE fileHandle,
nflag32 createFlag);
Description
The parameters are as follows:
- conn
-
(IN) Specifies the connection on which to create the file.
- dirHandle
-
(IN) Specifies the directory handle of the file to be created. It specifies the file to create along with fileName.
- fileName
-
(IN) Points to the name of the file to create. It specifies the file to create along with dirHandle.
- fileAttrs
-
(IN) Specifies the attributes of the file to be created.
- fileHandle
-
(OUT) Points to the handle of the file created.
- createFlag
-
(IN) Specifies if the file should be overwritten if it already exists:
NWCREATE_NEW_FILE 1
NWOVERWRITE_FILE 2
Return values
- 0x0000
-
SUCCESSFUL
- 0x8980
-
ERR_LOCK_FAIL
- 0x8981
-
NO_MORE_FILE_HANDLES
- 0x8984
-
NO_CREATE_PRIVILEGES
- 0x8985
-
NO_CREATE_DELETE_PRIVILEGES
- 0x8987
-
WILD_CARDS_IN_CREATE_FILE_NAME
- 0x898D
-
SOME_FILES_AFFECTED_IN_USE
- 0x898F
-
SOME_FILES_AFFECTED_READ_ONLY
- 0x8990
-
NO_FILES_AFFECTED_READ_ONLY
- 0x8996
-
SERVER_OUT_OF_MEMORY
- 0x8998
-
VOLUME_DOES_NOT_EXIST
- 0x8999
-
DIRECTORY_FULL
- 0x899B
-
BAD_DIRECTORY_HANDLE
- 0x899C
-
INVALID_PATH
- 0x89FD
-
BAD_STATION_NUMBER
- 0x89FF
-
NO_FILES_FOUND_ERROR
Notices
The client must have at least file creation privileges and perhaps file deletion privileges in the directory. The newly created file is stamped with the date and time of its
creation. The file attributes are set as specified:
0x00 FA_NORMAL
0x01 FA_READ_ONLY
0x02 FA_HIDDEN
0x04 FA_SYSTEM
0x08 FA_EXECUTE_ONLY
0x20 FA_NEEDS_ARCHIVED
0x80 FA_SHAREABLE
The file is opened as an exclusive file with both read and write access requested. The actual access rights granted depend on the client's actual access privileges in the
specified directory.
Services
File I/O
NCP calls
0x2222 67 File Create
0x2222 77 File Create
References
NWCloseFile(3nw),
NWOpenFile(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.