Opens a file for shared access
#include <nwfileng.h>
int FEsopen (
char *name,
int access,
int share,
int permission,
int flagBits,
BYTE dataStream);
(IN) Points to the name of the file to be opened.
(IN) Specifies the access mode of the file.
(IN) Specifies the sharing mode of the file.
(IN) Specifies the file permission (if the file is being created).
(IN) Specifies the special flags that allow more file flexibility.
(IN) Specifies the flag that indicates the data stream under which the file is to be opened.
Returns a file handle upon success. Returns a value of -1, and errno and NetWareErrno are set to the appropriate error codes if errors occur. See Return Values for C for more information.
FEsopen also works on the DOS partition and is a special version of the sopen function. Call the sopen function if the primary data stream is requested rather than calling FEsopen.
FEsopen does not behave identically to the sopen function when only the O_CREAT and O_TRUNC bits are passed. You must also pass DELETE_FILES_ON_CREATE_BIT to the flagBits parameter in FEsopen which allows the file to be deleted and created again.
The access mode is established as a combination of bits found in the FCNTL.H file and valid values follow:
The sharing mode is established as a combination of bits found in the NWSHARE.H file and valid values follow:
NOTE:If a new file is created, the share flag is ignored.
If FEsopen opens a file for compressed file I/O, the file must be opened in "exclusive mode" with SH_DENYRW. Otherwise, FEsopen fails.
The permission mode is established as a combination of bits found in the SYS\STAT.H file and valid values follow:
A value of 0 can be specified to indicate that the file is readable and writeable.
The flag bits are in nwfattr.h and valid values follow:
NOTE:If the flag is set to ENABLE_IO_ON_COMPRESSED_DATA_BIT or LEAVE_FILE_COMPRESSED_DATA_BIT (can be ORed), the share parameter must be set to SH_DENYRW or FEsopen fails.
The dataStream parameter is a constant defined in nwfattr.h indicating which of the data streams (streams of data stored as separate files on the volume) associated with a file stored on a NetWare 3.x or above server is to be opened. The defined data streams are PrimaryDataStream, MACResourceForkDataStream, and FTAMStructuringDataStream.