![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/domains/lavocat.quebec/public_html/node_modules/empathic/ |
// re-export existsSync?
const { accessSync, constants } = require("node:fs");
/**
* Does the current process have {@link mode} access?
* By default, checks if the path is visible to the proccess.
*
* @param mode A `fs.constants` value; default `F_OK`
*/
function ok(path, mode) {
try {
accessSync(path, mode);
return true;
} catch {
return false;
}
}
/**
* Can the current process write to this path?
*/
function writable(path) {
return ok(path, constants.W_OK);
}
/**
* Can the current process read this path?
*/
function readable(path) {
return ok(path, constants.R_OK);
}
/**
* Can the current process execute this path?
*/
function executable(path) {
return ok(path, constants.X_OK);
}
exports.ok = ok;
exports.writable = writable;
exports.readable = readable;
exports.executable = executable;