FileExists

From Soldat Community Wiki
Revision as of 11:00, 15 August 2012 by Freeman (talk | contribs) (Created page with "===From the Scripting Manual=== ''function FileExists(FileName: string): boolean;'' '''Parameter Info:''' FileName (String): File to be checked '''Description:''' T...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

From the Scripting Manual

function FileExists(FileName: string): boolean;

Parameter Info:
 FileName (String): File to be checked

Description:
 This function will return TRUE or FALSE depending if a file(FileName) exists.

Examples

begin
    if (FileExists('mysettings.ini')) then begin
       //Any code here will only get execute if the file exists!
       // You might want to use this function before using ReadINI or ReadFile.
    end;
end;


External Links