[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
XPfcreateNew()
Create a New file, handy for temporary files
------------------------------------------------------------------------------
Function: XPfcreateNew()
XPfcreateNew() creates a file just like fcreate(), the syntax
is also the same as Clipper's fcreate(), except that
XPfcreateNew() will not create the file is the file already
exists, it then returns error code 80 in XPferror().
This makes an algorithm to create temporary/unique files with
control over the name very easy.
Note that the XPtempName() is an easier to use function,
written in Clipper which handles all the hustle to create
a temporary file. This function is only provided so you can
have total control if you want so.
Syntax: XPfcreateNew(cFilename[,nAttr]) --> nHandle
Arguments: cFileName is the file to create (new), nAttr is the
attribute of the file to create and defaults to 0.
Returns: The handle of the file created, or -1, in that case,
XPferror() contains the DOS Error code.
Usage: /* Create an Unique file, named TEMPNAME */
XPfcreateNew('TEMPNAME')
if XPferror() = 80
? "File already exists!"
end
See XPtempName() (in another section) for a ready-to-use
function in your Applications.
See Also:
XPferror()
XPfunique()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson