$81 GRAYBYTE WORDPRESS FILE MANAGER $18

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/fstream/lib/

HOME
Current File : /opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/fstream/lib//link-reader.js
// Basically just a wrapper around an fs.readlink
//
// XXX: Enhance this to support the Link type, by keeping
// a lookup table of {<dev+inode>:<path>}, so that hardlinks
// can be preserved in tarballs.

module.exports = LinkReader

var fs = require('graceful-fs')
var inherits = require('inherits')
var Reader = require('./reader.js')

inherits(LinkReader, Reader)

function LinkReader (props) {
  var self = this
  if (!(self instanceof LinkReader)) {
    throw new Error('LinkReader must be called as constructor.')
  }

  if (!((props.type === 'Link' && props.Link) ||
    (props.type === 'SymbolicLink' && props.SymbolicLink))) {
    throw new Error('Non-link type ' + props.type)
  }

  Reader.call(self, props)
}

// When piping a LinkReader into a LinkWriter, we have to
// already have the linkpath property set, so that has to
// happen *before* the "ready" event, which means we need to
// override the _stat method.
LinkReader.prototype._stat = function (currentStat) {
  var self = this
  fs.readlink(self._path, function (er, linkpath) {
    if (er) return self.error(er)
    self.linkpath = self.props.linkpath = linkpath
    self.emit('linkpath', linkpath)
    Reader.prototype._stat.call(self, currentStat)
  })
}

LinkReader.prototype._read = function () {
  var self = this
  if (self._paused) return
  // basically just a no-op, since we got all the info we need
  // from the _stat method
  if (!self._ended) {
    self.emit('end')
    self.emit('close')
    self._ended = true
  }
}

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
1 Jan 1970 8.00 AM
root / root
0
abstract.js
1.984 KB
28 Sep 2021 4.36 PM
root / root
0644
collect.js
1.746 KB
28 Sep 2021 4.36 PM
root / root
0644
dir-reader.js
6.349 KB
28 Sep 2021 4.36 PM
root / root
0644
dir-writer.js
4.396 KB
28 Sep 2021 4.36 PM
root / root
0644
file-reader.js
3.891 KB
28 Sep 2021 4.36 PM
root / root
0644
file-writer.js
2.532 KB
28 Sep 2021 4.36 PM
root / root
0644
get-type.js
0.596 KB
28 Sep 2021 4.36 PM
root / root
0644
link-reader.js
1.472 KB
28 Sep 2021 4.36 PM
root / root
0644
link-writer.js
2.779 KB
28 Sep 2021 4.36 PM
root / root
0644
proxy-reader.js
1.957 KB
28 Sep 2021 4.36 PM
root / root
0644
proxy-writer.js
2.389 KB
28 Sep 2021 4.36 PM
root / root
0644
reader.js
6.918 KB
28 Sep 2021 4.36 PM
root / root
0644
socket-reader.js
0.894 KB
28 Sep 2021 4.36 PM
root / root
0644
writer.js
10.741 KB
28 Sep 2021 4.36 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF