mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-04 17:20:09 +00:00
Moved fs constants under constants as per documentation and added tests for access and accessSync
This commit is contained in:
@@ -165,6 +165,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
|
||||
///////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user