Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

fs.F_OK, fs.R_OK, fs.W_OK, fs.X_OK DEP0176

Handle DEP0176 via transforming imports of fs.F_OK, fs.R_OK, fs.W_OK, fs.X_OK from the root fs module to fs.constants.

See DEP0176

Example

  const fs = require('node:fs');

- fs.access('/path/to/file', fs.F_OK, callback);
+ fs.access('/path/to/file', fs.constants.F_OK, callback);
- fs.access('/path/to/file', fs.R_OK | fs.W_OK, callback);
+ fs.access('/path/to/file', fs.constants.R_OK | fs.constants.W_OK, callback);