checks to see if the filepath has already been processed
519270
def _processed_filepath(self, filepath):
        
        processed = False
        if filepath in self.processed_filepaths.values():
            processed = True

        return processed
243446
function doesFileExist(filePath) {
    if (!fileExistsCache.hasOwnProperty(filePath)) {
        fileExistsCache[filePath] = fs.existsSync(filePath);
    }

    return fileExistsCache[filePath];
}
377888
function isFileOrDir(filePath) {
	let fsStat;
	try {
		fsStat = fs.statSync(filePath);
	} catch (error) {
		return error;
	}

	let r = 'file';
	if (fsStat.isDirectory()) {
		r = 'directory';
	}

	return r;
}
1254225
function checkPath(string, callback, done) {
    var path = string;
    if (!(/^\.|\//).test(string)) {
        path = './' + string;
    }

    fs.stat(path, function(err) {
        if (err) {
            console.log(chalk.red('Error, cannot open: %s'), string);
            process.exit(1);
        } else {
            callback(path, done);
        }
    });
}
675884
def _is_modified(self, filepath):
        
        if self._is_new(filepath):
            return False
        mtime = self._get_modified_time(filepath)
        return self._watched_files[filepath] < mtime
769404
function isPathAccessible (filePath) {
  try {
    fs.accessSync(filePath)
    debug(`Utils: isPathAccessible(): ${filePath} exists`)
    return true
  } catch (err) {
    debug(`Utils: isPathAccessible(): ${filePath} does not exist`)
    return false
  }
}
1058814
function(filePath) {
        var ignoredPaths;

        if (this.options.ignore) {
            ignoredPaths = new IgnoredPaths(this.options);
            return ignoredPaths.contains(filePath);
        }

        return false;
    }
1033962
private void checkFile() throws IORuntimeException {
		if (false == file.exists()) {
			throw new IORuntimeException("File not exist: " + file);
		}
		if (false == file.isFile()) {
			throw new IORuntimeException("Not a file:" + file);
		}
	}
790974
function fileExists(file) {
    try {
        var targetStat = fs.statSync(file);
        if (targetStat.isDirectory() ) {
            throw new Error("File exists but it's a driectory: " + file);
        }
    }
    catch(err) {
        if (err.code == 'ENOENT') {         // No such file or directory
            return false;
        }
        else {
            throw err;
        }
    }
    return true;
}
767019
function(file) {
    var filePath = path.resolve(file);

    if (filePath) {
      if (!fs.existsSync(filePath)) {
        fse.ensureFileSync(filePath);
      }
      return filePath;
    }

    return false;
  }
1324978
def CheckPathExists(path):
  
  i = 0
  root, ext = os.path.splitext(path)
  while os.path.exists(path):
    i = i + 1
    goodlogging.Log.Info("UTIL", "Path {0} already exists".format(path))
    path = "{0}_{1}".format(root, i) + ext
  return path
1253673
private static boolean isChanged(byte[] bytes, String filepath) throws IOException {
        return isChanged(bytes, bytes.length,  filepath);
    }
951840
function (filePath)
    {
        if (0 === filePath.indexOf(process.cwd()))
        {
            filePath = path.relative(process.cwd(), filePath);
        }

        if (0 !== filePath.indexOf("./") && 0 !== filePath.indexOf("/"))
        {
            filePath = "./" + filePath;
        }

        return filePath;
    }
1081316
def done(self, key):
        '''
        
        '''
        # key is not done b/c the file does not even exist yet
        if not os.path.exists(self.path):
            return False

        is_done = False
        done_line = self._done_line(key)
        undone_line = self._undone_line(key)
        with open(self.path) as fh:
            for line in fh:
                if line == done_line:
                    is_done = True
                elif line == undone_line:
                    is_done = False

        return is_done
756602
function existsSync (filepath) {
  let res = true
  try {
    fs.statSync(filepath)
  } catch (e) {
    res = false
  }
  return res
}
1047299
public static boolean checkIfFileExists(String filePath) {
        File file = new File(filePath);// getSDCardPath(), filePath);
        return (file.exists() ? true : false);
    }
375555
function isDirectory(filePath) {
  if (!isExist(filePath)) return false;
  try {
    const stat = fs.statSync(filePath);
    return stat.isDirectory();
  } catch (e) {
    return false;
  }
}