File exists?
@param {String} filepath
@returns {boolean}
3629
function exists(filepath) {
		var does = grunt.file.exists(filepath);
		if (!does) {
			grunt.log.error(
				'Human error: ' + chalk.cyan(filepath) + ' not found.'
			);
			grunt.fail.errorcount++;
		}
		return does;
	}
422862
function(fileName, content) {
                return Promise()
                .then(function() {
                    var filePath = PathUtils.resolveInRoot(outputFolder, fileName);

                    return fs.exists(filePath);
                });
            }
688963
function fileExists(fileName) {
  return new BbPromise((resolve) => {
    fs.exists(fileName, (exists) => resolve(exists));
  });
}
382894
function exists(file, src, opts) {
	var files = opts.path.map(function (dir) {
		return path.join(dir, file);
	});

	files = globby.sync(files);

	if (!files.length) {
		throw new Error(createError(file, src, opts.path));
	}

	return files[0];
}
449256
public static boolean isFileExist(String filePath) {
        if (StringUtils.isEmpty(filePath)) {
            return false;
        }

        File file = new File(filePath);
        return (file.exists() && file.isFile());
    }
619745
public static boolean isLegalFile(String filePath) {
        File file = new File(filePath);
        if (!file.exists() || file.isDirectory() || !file.canRead()) {
            return false;
        }
        return true;
    }
202769
async function fileExists(f) {
  debug(`fileExists called with: ${JSON.stringify(arguments)}`);
  try {
    await fs.statAsync(f);
    return f;
  } catch (e) {
    throw e;
  }
}
985618
function(filepath) {
                        // Construct the destination file path.
                        var dest = path.join(
                            grunt.config('copy.coverage.dest'),
                            path.relative(process.cwd(), filepath)
                        );
                        // Return false if the file exists.
                        return !(grunt.file.exists(dest));
                    }
372861
def file_exists?(path)
      begin
        ret = self.quietly { ls(path) }
      rescue Rye::Err => ex
        ret = ex.rap
      end
      # "ls" returns a 0 exit code regardless of success in Linux
      # But on OSX exit code is 1. This is why we look at STDERR. 
      !(ret.exit_status > 0) || ret.stderr.empty?
    end
136101
function checkFileExistsSync(filepath){
  var flag = true;

  try {
    fs.accessSync(filepath, fs.F_OK);
  } catch(e){
    flag = false;
  }

  return flag;
}
554635
public function fileExists($path)
    {
        $filePath = $this->getFullPath($path);

        return file_exists($filePath) ? true : false;
    }
943495
async function exists(dir) {
  try {
    debug(`checking if ${dir} exists`);
    const s = await stat(dir);

    debug(`${dir} exists`);

    return s.isDirectory();
  }
  catch (err) {
    debug(`${dir} does not exist`);

    return false;
  }
}
102956
function fileExistsWithCaseSync (filepath) {
  const { base, dir, root } = path.parse(filepath)

  if (dir === root || dir === '.') {
    return true
  }

  try {
    const filenames = fs.readdirSync(dir)
    if (!filenames.includes(base)) {
      return false
    }
  } catch (e) {
    // dir does not exist
    return false
  }

  return fileExistsWithCaseSync(dir)
}
1269986
function (path) {
    if (fs.existsSync(path) && fs.statSync(path).isDirectory()) {
      return true;
    }
    return false;
  }
109599
public boolean exists(final Path f) throws IOException {
		try {
			return (getFileStatus(f) != null);
		} catch (FileNotFoundException e) {
			return false;
		}
	}
1047299
public static boolean checkIfFileExists(String filePath) {
        File file = new File(filePath);// getSDCardPath(), filePath);
        return (file.exists() ? true : false);
    }
504505
function isExistingFile(filename) {
    try {
        return fs.statSync(filename).isFile();
    } catch (err) {
        if (err.code === "ENOENT") {
            return false;
        }
        throw err;
    }
}