Opens or creates a file or creates a subdirectory with a given owning name space and using UTF-8 strings.
#include <nwnamspc.h>
or
#include <nwcalls.h>
NWCCODE N_API NWOpenNSEntryExt (
NWCONN_HANDLE conn,
nuint8 dirHandle,
nuint8 namSpc,
nuint8 dataStream,
const nstr8 N_FAR *path,
NW_NS_OPEN N_FAR *NSOpen,
NWFILE_HANDLE N_FAR *fileHandle);
(IN) Specifies the NetWare server connection handle.
(IN) Specifies the directory handle associated with the directory in which to create the file.
(IN) Specifies the name space for the file creation (see Section 20.5, Name Space Flag Values).
(IN) Specifies the data stream number if the name space is Mac OS:
For DOS, always pass 0.
(IN) Points to the name to use in creating the file. Optionally, it can point to an absolute path if dirHandle is zero. The characters in the string must be UTF-8.
(IN/OUT) Points to NW_NS_OPEN containing the information needed to open the entry. Results of a successful open are also returned in NW_NS_OPENCREATE.
(OUT) Points to the OS file handle; it returns zero if you are creating subdirectories. You can use this handle with the OS functions for reading, writing, and closing.
These are common return values; see Return Values (Return Values for C) for more information.
dirHandle can be zero if the path contains the complete path, including the volume name. (dirHandle / path should match namSpc.)
If you are creating a directory, pass NULL to fileHandle.
OC_MODE_ constants used in openCreateMode are listed below:
See Section 20.8, Search Attributes Values for the possible values for the searchAttributes field.
See Section 20.1, Access Right Values for the possible values for the desiredAccessRights field.
OC_ACTION_ constants used in openCreateAction are listed below:
|
C Value |
Value Name |
|---|---|
|
0x01 |
OC_ACTION_NONE |
|
0x01 |
OC_ACTION_OPEN |
|
0x02 |
OC_ACTION_CREATE |
|
0x04 |
OC_ACTION_TRUNCATE |
|
0x04 |
OC_ACTION_REPLACE |
The file handle returned is appropriate for the platform the API is written for. This file handle may be used for access to the attribute value through standard file I/O with the handle. This includes closing the file as well as reading and writing to the file.