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.1.1 to 0.1.2

14

ftp.js

@@ -23,3 +23,3 @@ var util = require('util'),

/*secure: false,*/
connTimeout: 60000, // in ms
connTimeout: 15000, // in ms
debug: false/*,

@@ -273,4 +273,6 @@ active: false*/ // if numerical, is the port number, otherwise should be false

var r = self.send('STOR', destpath, cb);
if (r)
instream.pipe(outstream);
if (r) {
instream.resume();
instream.pipe(outstream);
}
else

@@ -293,4 +295,6 @@ cb(new Error('Connection severed'));

var r = self.send('APPE', destpath, cb);
if (r)
if (r) {
instream.resume();
instream.pipe(outstream);
}
else

@@ -604,3 +608,3 @@ cb(new Error('Connection severed'));

for (var i=0,match,len=lines.length; i<len; ++i) {
if (match = lines[i].match(/^(\d{3})(?:$|(\s|-)(.*))/)) {
if (match = lines[i].match(/^(\d{3})(?:$|(\s|\-)(.+))/)) {
if (match[2] === '-') {

@@ -607,0 +611,0 @@ if (match[3])

{ "name": "ftp",
"version": "0.1.1",
"version": "0.1.2",
"author": "Brian White <mscdex@mscdex.net>",

@@ -4,0 +4,0 @@ "description": "An FTP client module for node.js",

@@ -12,3 +12,7 @@ Description

Install
============
npm install ftp
Examples

@@ -70,3 +74,3 @@ ========

var fs = require('fs');
conn.get('foo.txt', function(e, inStream) {
conn.get('foo.txt', function(e, stream) {
if (e)

@@ -81,3 +85,3 @@ throw e;

});
inStream.pipe(fs.createWriteStream('localfoo.txt'));
stream.pipe(fs.createWriteStream('localfoo.txt'));
});

@@ -129,3 +133,3 @@

* **Function:debug** - Accepts a string and gets called for debug messages **Default:** (no debug output)
* **Integer:connTimeout** - The number of milliseconds to wait for a connection to be established. **Default:** 60000
* **Integer:connTimeout** - The number of milliseconds to wait for a connection to be established. **Default:** 15000

@@ -196,12 +200,12 @@ * **connect**([Number:port],[String:host]) - _(void)_ - Attempts to connect to the FTP server. If the port and host are specified here, they override and overwrite those set in the constructor.

* **lastMod**(String:filename, Function:callback) - _Boolean:success_ - Retrieves the date and time the specified file was last modified. The callback has these parameters: the error (undefined if none) and an object with the following properties:
* **lastMod**(String:filename, Function:callback) - _Boolean:success_ - Retrieves the date and time the specified file was last modified. The callback has these parameters: the error (undefined if none) and an object:
* **Integer:entry**(Object:entryInfo) - Fires for each file or subdirectory. entryInfo contains the following possible properties:
* **Integer:month** - (1 through 12)
* **Integer:date** - (1 through 31)
* **Integer:year** - (4-digit)
* **Integer:hour** - (0 through 23)
* **Integer:minute** - (0 through 59)
* **Float:second** - (0 through 60 -- with 60 being used only at a leap second)
* **Object:modTime**
* **Integer:month** - (1 through 12)
* **Integer:date** - (1 through 31)
* **Integer:year** - (4-digit)
* **Integer:hour** - (0 through 23)
* **Integer:minute** - (0 through 59)
* **Float:second** - (0 through 60 -- with 60 being used only at a leap second)
* **restart**(String/Integer:byteOffset, Function:callback) - _Boolean:success_ - Sets the file byte offset for the next file transfer action (get/put/append). The callback has these parameters: the error (undefined if none).
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