async function doesFileExists()

in ark-demo/webapp/_templates/promptUtils.js [76:85]


async function doesFileExists(pathArray) {
  const viewFile = path.join(cwd(), ...pathArray);

  return new Promise((resolve) => {
    fs.access(viewFile, fs.F_OK, (err) => {
      if (err) resolve(false);
      return resolve(true);
    });
  });
}