-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing fs.existsSync #128
Comments
|
You can create this function very easy if you need it: async function exists(path) {
try {
await fs.stat(path);
return true;
} catch(e) {
return false;
}
} or function exists(path) {
return fs.stat(path)
.then(() => true)
.catch(() => false);
} no need for dangling let. |
Sure, but I know it's easy enough to shim, but that shouldn't be necessary. |
I don't think that you can implement But if you want to contribute and implement it (even that I think it's not possible) go ahead. |
It looks like the fairly critical
fs.existsSync
is missing from the set of available functions, which makes otherwise "simple if check" code a "try/catch with danglinglet
variables" mess. Could.existsSync
be added?The text was updated successfully, but these errors were encountered: