path{string|Buffer|URL}mode{string|integer}callback{Function}err{Error}
异步地更改文件的权限。 除了可能的异常,完成回调没有其他参数。
也可参见 chmod(2)。
fs.chmod('my_file.txt', 0o775, (err) => {if (err) throw err;console.log('文件 “my_file.txt” 的权限已被更改');});
path {string|Buffer|URL}mode {string|integer}callback {Function}err {Error}异步地更改文件的权限。 除了可能的异常,完成回调没有其他参数。
也可参见 chmod(2)。
fs.chmod('my_file.txt', 0o775, (err) => {if (err) throw err;console.log('文件 “my_file.txt” 的权限已被更改');});
若有收获,就点个赞吧
0 人点赞
让时间为你证明