Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fs.open('path/file.js', function(err, fd) {
- if (err && err.code == 'ENOENT') {
- // Does not exist
- } else if (!err) {
- // Does exist
- fs.close(fd);
- } else {
- // Some other error
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement