User Tools

Site Tools


Sidebar

file:isvalidfilepath

isValidFilePath()

Function to check that an absolute path points to a specif filename and that this specific filename exists at the path specified.

Usage

var path = "C:/myfile.txt";
var filetocheck = "myfile.txt";
if(isValidFilePath(path, filetocheck)) {
   //Do something if this file exists and the path points to the file specified
}

Parameters

Parameter Data type Required Description
path string Yes The absolute path that points to the file
filename string Yes The filename that the path needs to point to

Return Values

Value Meaning
true The path points to the specified file and the file exists on the file system
false The path does not point to the file or the file does not exist on the file system
file/isvalidfilepath.txt · Last modified: 2017/05/25 10:30 (external edit)