Socket
Socket
Sign inDemoInstall

ftp

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ftp - npm Package Compare versions

Comparing version 0.2.0 to 0.2.5

lib/ftp.js

7

package.json
{ "name": "ftp",
"version": "0.2.0",
"version": "0.2.5",
"author": "Brian White <mscdex@mscdex.net>",
"description": "An FTP client module for node.js",
"main": "./ftp",
"main": "./lib/ftp",
"engines": { "node" : ">=0.8.0" },
"dependencies": {
"xregexp": "*"
},
"keywords": [ "ftp", "client", "transfer" ],

@@ -8,0 +11,0 @@ "licenses": [ { "type": "MIT", "url": "http://github.com/mscdex/node-ftp/raw/master/LICENSE" } ],

@@ -65,3 +65,3 @@ Description

c.on('ready', function() {
c.put(fs.createReadStream('foo.txt'), 'foo.remote-copy.txt', function(err) {
c.put('foo.txt', 'foo.remote-copy.txt', function(err) {
if (err) throw err;

@@ -75,2 +75,3 @@ c.end();

API

@@ -82,2 +83,4 @@ ===

* **greeting**(< _string_ >msg) - Emitted after connection. `msg` is the text the server sent upon connection.
* **ready**() - Emitted when connection and authentication were sucessful.

@@ -105,2 +108,4 @@

* secure - _mixed_ - Set to true for both control and data connection encryption, 'control' for control connection encryption only, or 'implicit' for implicitly encrypted control connection (this mode is deprecated in modern times, but usually uses port 990) **Default:** false
* user - _string_ - Username for authentication. **Default:** 'anonymous'

@@ -110,3 +115,3 @@

* connTimeout - _integer_ - How long (in milliseconds) to wait for the main connection to be established. **Default:** 10000
* connTimeout - _integer_ - How long (in milliseconds) to wait for the control connection to be established. **Default:** 10000

@@ -121,4 +126,6 @@ * pasvTimeout - _integer_ - How long (in milliseconds) to wait for a PASV data connection to be established. **Default:** 10000

* **list**([< _string_ >path, ]< _function_ >callback) - _(void)_ - Retrieves the directory listing of `path`. `path` defaults to the current working directory. `callback` has 2 parameters: < _Error_ >err, < _array_ >list. `list` is an array of objects with these properties:
* **list**([< _string_ >path, ][< _boolean_ >useCompression, ]< _function_ >callback) - _(void)_ - Retrieves the directory listing of `path`. `path` defaults to the current working directory. `useCompression` defaults to false. `callback` has 2 parameters: < _Error_ >err, < _array_ >list. `list` is an array of objects with these properties:
* type - _string_ - A single character denoting the entry type: 'd' for directory, '-' for file (or 'l' for symlink on **\*NIX only**).
* name - _string_ - The name of the entry.

@@ -137,4 +144,2 @@

* other - _string_ - An empty string or any combination of 'r', 'w', 'x'.
* type - _string_ - A single character denoting the entry type: 'd' for directory, '-' for file (or 'l' for symlink on **\*NIX only**).

@@ -147,7 +152,7 @@ * owner - _string_ - The user name or ID that this entry belongs to **(*NIX only)**.

* **get**(< _string_ >path, < _function_ >callback) - _(void)_ - Retrieves a file, `path`, from the server. `callback` has 2 parameters: < _Error_ >err, < _ReadableStream_ >fileStream.
* **get**(< _string_ >path, [< _boolean_ >useCompression, ]< _function_ >callback) - _(void)_ - Retrieves a file, `path`, from the server. `useCompression` defaults to false. `callback` has 2 parameters: < _Error_ >err, < _ReadableStream_ >fileStream.
* **put**(< _mixed_ >input, < _string_ >path, < _function_ >callback) - _(void)_ - Sends data to the server to be stored as `path`. `input` can be a ReadableStream or a single Buffer. `callback` has 1 parameter: < _Error_ >err.
* **put**(< _mixed_ >input, < _string_ >destPath, [< _boolean_ >useCompression, ]< _function_ >callback) - _(void)_ - Sends data to the server to be stored as `path`. `input` can be a ReadableStream, a Buffer, or a path to a local file. `useCompression` defaults to false. `callback` has 1 parameter: < _Error_ >err.
* **append**(< _mixed_ >input, < _string_ >path, < _function_ >callback) - _(void)_ - Same as **put()**, except if `path` already exists, it will be appended to instead of overwritten.
* **append**(< _mixed_ >input, < _string_ >destPath, [< _boolean_ >useCompression, ]< _function_ >callback) - _(void)_ - Same as **put()**, except if `destPath` already exists, it will be appended to instead of overwritten.

@@ -174,3 +179,3 @@ * **rename**(< _string_ >oldPath, < _string_ >newPath, < _function_ >callback) - _(void)_ - Renames `oldPath` to `newPath` on the server. `callback` has 1 parameter: < _Error_ >err.

* **system**(< _function_ >callback) - _(void)_ - Retrieves information about the server's operating system. `callback` has 2 parameters: < _Error_ >err, < _string_ >info.
* **system**(< _function_ >callback) - _(void)_ - Retrieves the server's operating system. `callback` has 2 parameters: < _Error_ >err, < _string_ >OS.

@@ -183,2 +188,2 @@ ### Extended commands (RFC 3659)

* **restart**(< _integer_ >byteOffset, < _function_ >callback) - _(void)_ - Sets the file byte offset for the next file transfer action (get/put/append) to `byteOffset`. `callback` has 1 parameter: < _Error_ >err.
* **restart**(< _integer_ >byteOffset, < _function_ >callback) - _(void)_ - Sets the file byte offset for the next file transfer action (get/put) to `byteOffset`. `callback` has 1 parameter: < _Error_ >err.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc