DirectoryExists
Determines whether a directory exists
Method Signature
DirectoryExists(path=[string], allowRealPath=[boolean])
Arguments
Argument
Type
Required
Description
Default
path
string
true
The directory path
allowRealPath
boolean
true
Whether to allow an absolute path as the path argument
true
Examples
Script Syntax
Checking if a directory called 'icons' exists and then creating the directory if it does not exist.
if( !directoryExists( expandPath( "/assets/img/icons" ) ) ) {
directoryCreate( "assets/img/icons" );
}
Result: The directory 'icons' will be created under the img folder.
Additional Examples
directoryExists( "directoryPath" );
Result: false
Related
Last updated
Was this helpful?