From Clomosy Docs
No edit summary |
ClomosyAdmin (talk | contribs) No edit summary |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
clFileExists | <div class="alert alert-ligth border border-3 border-primary-subtle rounded-5 p-4 shadow-sm" role="alert"> | ||
function clFileExists(const FileName: string; CombinePathString:String): Boolean; | |||
</div> | |||
The | It is a function that is part of the Clomosy platform and checks for the existence of a specified file. If the specified file exists, it returns True; if it does not exist, it returns False.<br> | ||
The function takes two parameters: the first parameter is the name of the file being searched for, and the second parameter is the file path written as a string.<br> | |||
< | The general usage is as follows:<br> | ||
<pre> | |||
clFileExists('file.txt','D:\Clomosy'); //clFileExists('ball.png', Clomosy.AppFilesPath) | |||
</pre> | |||
< | <b>Example</b><br> | ||
''' | <pre> | ||
{ | |||
if (clFileExists('file.txt',Clomosy.AppFilesPath)) | |||
{ | |||
clShowMessage('file exists'); | |||
} | |||
Else | |||
{ | { | ||
clShowMessage('no file'); | |||
} | } | ||
} | |||
</pre> | |||
<h2> See Also </h2> | |||
* [[ | * [[System_Library#Cl_Utilities_Functions | Cl Utilities Functions]] | ||
* [[File_Handling | File Handling]] | |||
{{#seo:|title=ClFileExists Using- Clomosy Docs}} | |||
{{#seo:|description=Learn about ClFileExists on Clomosy. Understand how to efficiently check for file existence and avoid errors in your projects.}} | |||
Latest revision as of 13:27, 24 December 2024
function clFileExists(const FileName: string; CombinePathString:String): Boolean;
It is a function that is part of the Clomosy platform and checks for the existence of a specified file. If the specified file exists, it returns True; if it does not exist, it returns False.
The function takes two parameters: the first parameter is the name of the file being searched for, and the second parameter is the file path written as a string.
The general usage is as follows:
clFileExists('file.txt','D:\Clomosy'); //clFileExists('ball.png', Clomosy.AppFilesPath)
Example
{
if (clFileExists('file.txt',Clomosy.AppFilesPath))
{
clShowMessage('file exists');
}
Else
{
clShowMessage('no file');
}
}