File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1243,6 +1243,13 @@ possible exception are given to the completion callback.
12431243
12441244See also: chmod(2).
12451245
1246+ ``` js
1247+ fs .chmod (' my_file.txt' , 775 , (err ) => {
1248+ if (err) throw err;
1249+ console .log (' The permissions for file "my_file.txt" have been changed!' );
1250+ });
1251+ ```
1252+
12461253### File modes
12471254
12481255The ` mode ` argument used in both the ` fs.chmod() ` and ` fs.chmodSync() `
@@ -1293,13 +1300,6 @@ Caveats: on Windows only the write permission can be changed, and the
12931300distinction among the permissions of group, owner or others is not
12941301implemented.
12951302
1296- ``` js
1297- fs .chmod (' my_file.txt' , 775 , (err ) => {
1298- if (err) throw err;
1299- console .log (' The permissions for file "my_file.txt" have been changed!' );
1300- });
1301- ```
1302-
13031303## fs.chmodSync(path, mode)
13041304<!-- YAML
13051305added: v0.6.7
You can’t perform that action at this time.
0 commit comments