方法說明
fchmod() 的同步版本,透過檔案描述符變更檔案權限。
fchmod()
語法
fs.fchmodSync(fd, mode)
此方式屬於 fs 模組,使用前必須先引入:var fs = require("fs")
var fs = require("fs")
參數說明
fd:檔案描述符。
mode:要設定的檔案權限。
原始碼
fs.fchmodSync = function(fd, mode) { return binding.fchmod(fd, modeNum(mode)); };