From Clomosy Docs
No edit summary |
No edit summary |
||
| Line 9: | Line 9: | ||
'''Example:''' | '''Example:''' | ||
:''Base Syntax'' | |||
'''Begin''' | '''Begin''' | ||
If clFileExists('file.txt','C:\Clomosy') Then | If clFileExists('file.txt','C:\Clomosy') Then | ||
| Line 15: | Line 16: | ||
clShowMessage('no file'); | clShowMessage('no file'); | ||
'''End;''' | '''End;''' | ||
:''TRObject Syntax'' | |||
if (clFileExists('file.txt','C:\Clomosy')) | |||
{ | |||
clShowMessage('file exists'); | |||
} | |||
Else | |||
{ | |||
clShowMessage('no file'); | |||
} | |||
= See Also = | = See Also = | ||
* [[Controls| Controls]] | * [[Controls| Controls]] | ||
Revision as of 08:03, 24 January 2024
clFileExists is part of the Clomosy library and is a function that checks for the existence of the specified file. Returns True if the specified file exists, False otherwise.
The general usage is as follows:
clFileExists(FileNameString:WideString; CombinePathString:String);
FileNameString : Searched file name.
CombinePathString : Path to the searched file.
Example:
- Base Syntax
Begin
If clFileExists('file.txt','C:\Clomosy') Then
clShowMessage('file exists')
Else
clShowMessage('no file');
End;
- TRObject Syntax
if (clFileExists('file.txt','C:\Clomosy'))
{
clShowMessage('file exists');
}
Else
{
clShowMessage('no file');
}