isFile = filepath => {
  try {
    return fs.existsSync(filepath) && fs.lstatSync(filepath).isFile()
  } catch (_) {
    return false
  }
}
Returns true if the path is a file with read access.

@param {string} filepath The file path.