F.88 DeleteCtFile
Delete c-tree Plus file.
Short Name
DELFIL
TYPE
Low-level function
DECLARATION
COUNT DeleteCtFile(COUNT filno)DESCRIPTION
DeleteCtFile deletes the file opened with file number filno, if and only if the file has been opened in the ctEXCLUSIVE mode. The file is closed by c-tree Plus before it is deleted.
Any c-tree Plus file may be deleted with DeleteCtFile, whether it has been opened or created with a low-level function, an ISAM parameter file, or with incremental ISAM structures; provided the file has been opened in ctEXCLUSIVE file mode.
RETURN
See Appendix A "c-tree Plus Error Codes" of the c-tree Plus Programmer's Reference Guide for a complete listing of valid c-tree Plus error values.
EXAMPLE
COUNT tempno;if (CreateDataFile(tempno = 5,"temp.dat",1004,0,ctEXCLUSIVE)){printf("\nCould not create temporary file (%d)\n", uerr_cod);temporary_processing(tempno);if (DeleteCtFile(tempno)) {printf("\nCould not delete temporary file (%d)\n", uerr_cod);LIMITATIONS
DeleteCtFile first closes the file before deletion. This permits another process to have a small window of opportunity to gain control of the file in which case the delete will fail and result in an error DLTF_ERR (55).
|
FairCom Corporation www.faircom.com |