DFSsopen
Opens the requested file in Direct File Mode
#include <nwdfs.h> LONG DFSsopen ( BYTE *fileName, LONG access, LONG share, LONG permission, LONG flagBits, LONG dataStream);
!= -1 |
The requested operation is complete. The actual value returned is a file handle which is used for other functions that operate on the file. |
== -1 |
The requested file was not opened. |
If an error has occurred, errno can be set to
When an error occurs, NetWareErrno is set to
The name of the file to be opened is given by the filename parameter. The file is accessed according to the access mode specified by the access parameter.
When a file is opened in direct file mode by calling DFSsopen, DFS flags the file as being in direct file mode. In this mode, the cache and TTS are bypassed for future accesses to the file. Existing cache entries for the file are flushed and a turbo FAT for the file is built if one does not currently exist.
This could cause problems with other applications that have already opened the file in normal non-direct mode. In this case, the file is switched to direct mode, and the program with the file open in normal mode is able to read the file but cannot write to it. A close must be issued for each handle obtained by an open for the file before the file can be reopened for full normal mode access again (see Input and Output).
The access parameter can have the following values as defined in FCNTL.H:
The share parameter can have the following values as defined in NWSHARE.H:
The dataStream parameter can have the following values as defined in nwfile.h: