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