FEcreat

Creates a file

Local Servers:blocking
Remote Servers:blocking
NetWare Server:3.x, 4.x, 5.x, 6.x
Platform:NLM
Service:File Engine

Syntax

   #include <nwfileng.h>  
    
   int FEcreat  (  
      char  *name,   
      int    permission,   
      int    flagBits); 
   

Parameters

name

(IN) Points to the name of the file to be opened.

permission

(IN) Specifies the file permission (if the file is being created).

flagBits

(IN) Specifies the special flags that allow more file flexibility.

Return Values

When there is no error opening the file, the function returns a file handle. When an error occurs, it returns a value of -1, and errno and NetWareErrno are set to the appropriate error codes. See Return Values for C for more information.

Remarks

This function also works on the DOS partition.

This is a special version of creat.

If the specified file does not exist, FEcreat creates the file with the specified file permission.

The permission mode is established as a combination of bits found in the SYS\STAT.H file. The following bits are defined:

S_IWRITE

The file is writeable.

S_IREAD

The file is readable.

A value of 0 can be specified to indicate that the file is readable and writeable.

The flag bits can be found in nwfattr.h and are defined as follows:

DELETE_FILE_ON_CREATE_BIT

If the file already exists, it is deleted. This allows the file to be created again.

NO_RIGHTS_CHECK_ON_OPEN_BIT

The user’s rights to the file are not checked when the file is opened.

NO_RIGHTS_CHECK_ON_CREATE_BIT

The user’s rights to the file are not checked when the file is created.

FILE_WRITE_THROUGH_BIT

When a file write is performed, the write function does not return until the data is actually written to the disk.

ENABLE_IO_ON_COMPRESSED_DATA_BIT

Any subsequent I/O on this entry is compressed (NetWare 4.x, 5.x, and 6.x)

LEAVE_FILE_COMPRESSED_DATA_BIT

After all I/O has been done, leave this file compressed (NetWare 4.x, 5.x, and 6.x)

See Also

close