User Tools

Site Tools


fileexists_confirm_file_existence_.htm
Navigation:  Advanced Topics > Clarion Language Utilities >====== FileExists (Confirm file existence) ====== Previous pageReturn to chapter overviewNext page

FILEEXISTS( filename )

blk2blue.jpg

FILEEXISTS Confirm the existence of a file
filename A string constant or variable containing the name of the file (and path, if applicable)

FILEEXISTS confirms the existence of a file. If FILEEXISTS returns TRUE (1), the file exists. If FILEEXISTS returns FALSE (0), the file specified in the filename parameter does not exist.

To add support for this utility to your existing applications, you need only include the CWUTIL.INC file in the Global Map section of your program:

INCLUDE('CWUTIL.INC'),ONCE

Return Data Type: BYTE

Example:

IF NOT FILEEXISTS(GLO:NewFile)              !If the file does not exist

DO CreateFile                              !Call the ROUTINE to create it

END

IF NOT FILEEXISTS('C:\INVOICE\Config.dat')  !Does the config file exists

InitConfig                                 !Call init procedure

END

fileexists_confirm_file_existence_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1