[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
_fsCreate()
Create a file
------------------------------------------------------------------------------
C Prototype
#include "filesys.api"
FHANDLE _fsCreate(
BYTEP fpFilename,
USHORT uiAttribute
)
Arguments
fpFilename is the name of the file to create specified as a null-
terminated string. The fpFilename must be fully specified, including
the drive letter, path, and extension.
uiAttribute is one of the DOS archive attributes shown in the table
below:
File Create Flags
------------------------------------------------------------------------
Constant Flag Description
------------------------------------------------------------------------
FC_NORMAL 0x0000 No file attributes are set
FC_READONLY 0x0001 Read-only file attribute is set
FC_HIDDEN 0x0002 Hidden file attribute is set
FC_SYSTEM 0x0004 System file attribute is set
------------------------------------------------------------------------
Returns
_fsCreate() returns a DOS handle to the newly created file, or FS_ERROR,
if an error occurs.
Description
This function creates a file named fpFilename according to the value of
uiAttribute. It is equivalent to the CA-Clipper function FCREATE().
Examples
. The following code fragment illustrates the use of
_fsCreate(). Note that error handling should be performed at each
step. Refer to the "Error System API Reference" chapter of this
guide for details on communicating with the CA-Clipper Error system:
#include "filesys.api"
FHANDLE hFile;
// Create a normal read/write file
hFile = _fsCreate( "Foo", FC_NORMAL );
if (! _fsError() )
{
.
.
.
_fsClose( hFile );
}
Files Library is CLIPPER.LIB, header file is Filesys.api.
See Also:
_fsClose()
_fsError()
_fsOpen()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson