Merge pull request #11066 from alejo90/move-fs-constants

Moved fs constants under constants as per documentation
This commit is contained in:
Zhengbo Li
2016-09-07 10:32:19 -07:00
committed by GitHub
2 changed files with 33 additions and 8 deletions

View File

@@ -166,6 +166,22 @@ fs.watch('/tmp/foo-', {
console.log(event, filename);
});
fs.access('/path/to/folder', (err) => {});
fs.access(Buffer.from(''), (err) => {});
fs.access('/path/to/folder', fs.constants.F_OK | fs.constants.R_OK, (err) => {});
fs.access(Buffer.from(''), fs.constants.F_OK | fs.constants.R_OK, (err) => {});
fs.accessSync('/path/to/folder');
fs.accessSync(Buffer.from(''));
fs.accessSync('path/to/folder', fs.constants.W_OK | fs.constants.X_OK);
fs.accessSync(Buffer.from(''), fs.constants.W_OK | fs.constants.X_OK);
///////////////////////////////////////////////////////
/// Buffer tests : https://nodejs.org/api/buffer.html
///////////////////////////////////////////////////////