Skip to content

Commit

Permalink
connection: add SITE capability
Browse files Browse the repository at this point in the history
  • Loading branch information
mscdex committed Aug 10, 2013
1 parent 4c9a3b5 commit 4593c6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ Methods

* **abort**(< _function_ >callback) - _(void)_ - Aborts the current data transfer (e.g. from get(), put(), or list()). `callback` has 1 parameter: < _Error_ >err.

* **site**(< _string_ >command, < _function_ >callback) - _(void)_ - Sends `command` (e.g. 'CHMOD 755 foo', 'QUOTA') using SITE. `callback` has 3 parameters: < _Error_ >err, < _string >responseText, < _integer_ >responseCode.

* **status**(< _function_ >callback) - _(void)_ - Retrieves human-readable information about the server's status. `callback` has 2 parameters: < _Error_ >err, < _string_ >status.

* **ascii**(< _function_ >callback) - _(void)_ - Sets the transfer data type to ASCII. `callback` has 1 parameter: < _Error_ >err.
Expand Down
4 changes: 4 additions & 0 deletions lib/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,10 @@ FTP.prototype.delete = function(path, cb) {
this._send('DELE ' + path, cb);
};

FTP.prototype.site = function(cmd, cb) {
this._send('SITE ' + cmd, cb);
};

FTP.prototype.status = function(cb) {
this._send('STAT', cb);
};
Expand Down

0 comments on commit 4593c6a

Please sign in to comment.