@opengis/fastify-table
Version:
core-plugins
17 lines (13 loc) • 329 B
JavaScript
import { access } from 'node:fs/promises';
import getPath from './getPath.js';
const isFileExists = async (filepath, options = {}) => {
const fullPath = getPath(filepath, options);
try {
await access(fullPath);
return true;
}
catch (err) {
return false;
}
};
export default isFileExists;