From Clomosy Docs
No edit summary |
No edit summary |
||
| Line 9: | Line 9: | ||
'''Example:''' | '''Example:''' | ||
:''TRObject Syntax'' | :'''TRObject Syntax''' | ||
{ | |||
if (clFileExists('file.txt',Clomosy.AppFilesPath)) | if (clFileExists('file.txt',Clomosy.AppFilesPath)) | ||
{ | { | ||
| Line 26: | Line 20: | ||
clShowMessage('no file'); | clShowMessage('no file'); | ||
} | } | ||
} | |||
:'''Base Syntax''' | |||
'''Begin''' | |||
If clFileExists('file.txt',Clomosy.AppFilesPath) Then | |||
clShowMessage('file exists') | |||
Else | |||
clShowMessage('no file'); | |||
'''End;''' | |||
= See Also = | = See Also = | ||
* [[Controls| Controls]] | * [[Controls| Controls]] | ||
Revision as of 10:54, 23 August 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:
- TRObject Syntax
{
if (clFileExists('file.txt',Clomosy.AppFilesPath))
{
clShowMessage('file exists');
}
Else
{
clShowMessage('no file');
}
}
- Base Syntax
Begin
If clFileExists('file.txt',Clomosy.AppFilesPath) Then
clShowMessage('file exists')
Else
clShowMessage('no file');
End;