| Current Path : /var/www/html/redd/public/tailadmin/node_modules/path-exists/ |
| Current File : /var/www/html/redd/public/tailadmin/node_modules/path-exists/index.js |
import fs, {promises as fsPromises} from 'node:fs';
export async function pathExists(path) {
try {
await fsPromises.access(path);
return true;
} catch {
return false;
}
}
export function pathExistsSync(path) {
try {
fs.accessSync(path);
return true;
} catch {
return false;
}
}