|
Previous Top Next |
Prototype: | (String pFileName, Long pAttribute=FF_:Normal),Long |
pFileName | The file name to check if exist. The pFileName parameter can contain wildcards for the filename and extension. |
pAttribute | Attribute to look for. By default it is set to FF_:Normal. Added August 3, 2010 |
Returns | The number of files that matches the pFileName parameter. |
This method is to replace the EXISTS function in Clarion. It is not always reliable unless the filename is changed to a ShortPath(). The FileExists method uses the DIRECTORY() function in Clarion to check for the file existence. This has a second benefit also because you can specify wildcards for the filename and the function will return the number of files that exist and match the wildcards.
Example:
ITC ITCoreClass
p CSTRING(2049)
CODE
p = 'c:\temp\*.txt'
MESSAGE('Files matching "' & p & '" = ' & ITC.FileExists(p))
See also: