MCPcopy Create free account
hub / github.com/mscdex/ssh2 / exists

Method exists

lib/protocol/SFTP.js:721–728  ·  view source on GitHub ↗
(path, cb)

Source from the content-addressed store, hash-verified

719 this.writeFile(path, data, options, callback);
720 }
721 exists(path, cb) {
722 if (this.server)
723 throw new Error('Client-only method called in server mode');
724
725 this.stat(path, (err) => {
726 cb && cb(err ? false : true);
727 });
728 }
729 unlink(filename, cb) {
730 if (this.server)
731 throw new Error('Client-only method called in server mode');

Callers

nothing calls this directly

Calls 1

statMethod · 0.95

Tested by

no test coverage detected