Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.3 . Technical Reference - <b>_fscreate()</b> http://www.X-Hacker.org [<<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()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson