Instructions for the fs.readlink method in node.js

  • 2020-05-05 10:56:07
  • OfStack

method description:

The link is read asynchronously.

syntax:


fs.readlink(path, [callback(err,linkString)])

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

before using it

receive parameters:

path                 path

callback       callback, passing 2 parameters, exceptions err and   linkString return the link string

source:


fs.readlink = function(path, callback) {
  callback = makeCallback(callback);
  if (!nullCheck(path, callback)) return;
  binding.readlink(pathModule._makeLong(path), callback);
};


Related articles: