Checks if a given path is a valid directory path.
isDir('/home/demo/pictures')// => trueisDir('/home/demo/pictures/dummy.jpeg')// => falseisDir('C:\\Users\\Documents\\Folder1')// => trueisDir('/var/www/html')// => trueisDir('C:\\Users\\Documents\\File1.txt')// => false Copy
isDir('/home/demo/pictures')// => trueisDir('/home/demo/pictures/dummy.jpeg')// => falseisDir('C:\\Users\\Documents\\Folder1')// => trueisDir('/var/www/html')// => trueisDir('C:\\Users\\Documents\\File1.txt')// => false
The path to be checked.
true if the path is a valid directory path, false otherwise.
true
false
Generated using TypeDoc v0.24.7
Checks if a given path is a valid directory path.
Example