lib/fs-utils.js
function getAttr(fs, pathOrFd, attr, isFd, callback) {
  var getFn = 'fgetxattr';

  if(isFd !== true) {
    callback = isFd;
    getFn = 'getxattr';
  }

  fs[getFn](pathOrFd, attr, function(err, value) {
    if(err && err.code !== 'ENOATTR') {
      return callback(err);
    }

    callback(null, value);
  });
}
function getAttr(fs, pathOrFd, attr, isFd, callback) {
  var getFn = 'fgetxattr';

  if(isFd !== true) {
    callback = isFd;
    getFn = 'getxattr';
  }

  fs[getFn](pathOrFd, attr, function(err, value) {
    if(err && err.code !== 'ENOATTR') {
      return callback(err);
    }

    callback(null, value);
  });
}
function getAttr ( fs , pathOrFd , attr , isFd , callback ) { var getFn = 'fgetxattr' ; if ( isFd !== true ) { callback = isFd ; getFn = 'getxattr' ; } fs [ getFn ] ( pathOrFd , attr , function ( err , value ) { if ( err && err . code !== 'ENOATTR' ) { return callback ( err ) ; } callback ( null , value ) ; } ) ; }
Get the metadata for a path or file descriptor
Get the metadata for a path or file descriptor