Instructions for the fs.chownSync method in node.js
- 2020-05-07 19:09:43
- OfStack
method description:
chown().
syntax:
fs.chownSync(path, uid, gid)
Since this method belongs to the fs module, the fs module (var fs= require(" fs ")) needs to be introduced before use.
receive parameter:
path directory path
uid user ID
gid group identity
example:
fs.chownSync('content.txt', uid, gid);
source code:
fs.chownSync = function(path, uid, gid) {
nullCheck(path);
return binding.chown(pathModule._makeLong(path), uid, gid);
};