Function FExists() Foundation
Determines whether the specified file exists.
FExists( <cFileName>, [<cFileAttribute>] ) --> lExists
Modifier | Description |
---|---|
+ | Check files having this attribute set (prefix notation) |
- | Ignore files having this attribute set (prefix notation) |
= | Ignore default settings and force exact match. The equal sign must be the first character, if used. |
* | Match the defined attributes regardless of whether or not other attributes are set. The asterisk must be the last character, if used. |
The functions returns .T. (true) if the file exists, otherwise .F. (false).
The FExists() function is a low level file function which determines if a file with a given name and the optional attribute limitation exists. In contrast to File() , the directories specified with SET DEFAULT or SET PATH are not included in the search. FExists() searches files only in the directory specified with<cFileName>, or in the current directory when the parameter contains no directory information. If <cFileName> includes a relative path, the search begins in the current directory of the current drive.
Since FExists() searches files independently of the SET PATH/SET DEFAULT settings, it is the recommended function to check for the existence of files.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.