Notch Notch Manual 0.9.23
 Light | Dark
FileOrDirectoryExists()

FileOrDirectoryExists()

Purpose #

Checks whether the file or directory exists on disk.

Syntax #

bool FileOrDirectoryExists(String path_to_file_or_directory);

Parameters

path_to_file_or_directoryThe path to the file or directory to check.

Example #

function Update()
{
    var dirExists = FileOrDirectoryExists("C:\\myFolder");
    var fileExists = FileOrDirectoryExists("C:\\myFolder\\myFile.txt");
    if(dirExists)
        Log("Directory exists");
    if(fileExists)
        Log("File exists");
}