SoFunction
Updated on 2025-03-02

Instructions for using the method

Method description:

Change file ownership (file descriptor).

grammar:

Copy the codeThe code is as follows:

(fd, uid, gid, [callback(err)])

Since this method belongs to the FS module, it is necessary to introduce the FS module before use (var fs= require("fs") )

Receive parameters:

fd                                                              �

uid

gid                                                                                                                              �

callback    callback, passing exception parameters err

example:

Copy the codeThe code is as follows:

('', 'a', function (err, fd) {
 if (err) {
  throw err;
 }
 (fd, uid, gid, function(err){
  if (err) {
   throw err;
  }
  ('fchmod complete');
  (fd, function () {
   ('Done');
  });
 })
});

Source code:

Copy the codeThe code is as follows:

= function(fd, uid, gid, callback) {
  (fd, uid, gid, makeCallback(callback));
};