fileExists = async (filePath) => {
  try {
    await fs.access(filePath, fs.constants.F_OK)
    return true
  } catch (error) {
    return false
  }
}
Asynchronously checks if a file exists at the specified file path.

@async
@function fileExists
@param {string} filePath - The path to the file whose existence is to be checked.
@returns {Promise<boolean>} A promise that resolves to `true` if the file exists, or `false` if it does not.
@example
async function checkFile() {
  const exists = await fileExists('./example.txt');
  console.log(exists ? 'File exists' : 'File does not exist');
}