FileOrDirectoryExists()
Updated: 4 Dec 2023
Updated: 4 Dec 2023
Checks whether the file or directory exists on disk.
bool FileOrDirectoryExists(String path_to_file_or_directory);
path_to_file_or_directory | The path to the file or directory to check. |
function Update()
{
var dirExists = FileOrDirectoryExists("C:\\myFolder");
var fileExists = FileOrDirectoryExists("C:\\myFolder\\myFile.txt");
if(dirExists)
Log("Directory exists");
if(fileExists)
Log("File exists");
}