Skip to content
Permalink
Browse files

doc: add example for chmod in fs.md

PR-URL: #28365
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information...
roadev authored and targos committed Jun 21, 2019
1 parent c177a68 commit e83b2563061f75ae1351c12cdc58029cb93cb708
Showing with 7 additions and 0 deletions.
  1. +7 −0 doc/api/fs.md
@@ -1181,6 +1181,13 @@ possible exception are given to the completion callback.

See also: chmod(2).

```js
fs.chmod('my_file.txt', 0o775, (err) => {
if (err) throw err;
console.log('The permissions for file "my_file.txt" have been changed!');
});
```

### File modes

The `mode` argument used in both the `fs.chmod()` and `fs.chmodSync()`

0 comments on commit e83b256

Please sign in to comment.
You can’t perform that action at this time.