Skip to content

This is wraps `ftp` to provide a streaming interface for downloading files via FTP.

License

Notifications You must be signed in to change notification settings

phillipgreenii/node-ftp-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ftp-stream

npm version Build Status Code Climate david-dm Test Coverage

This is wraps ftp to provide a streaming interface for downloading files via FTP.

Install

npm install ftp-stream --save

Usage

ftpStream([ftpConnectOptions], files)

ftpConnectOptions

Type: Object

The connect options passed to ftp.connect().

files

Type: array of String

An array of files to download.

Example

Download README.txt from localhost on port 21 as anonymous

var fs = require('vinyl-fs');
var ftpStream = require('ftp-stream');

ftpStream(['README.txt'])
.pipe(fs.dest('./output'));

Download secret.txt from ftp.secret.info on port 1234 as walter

var fs = require('vinyl-fs');
var ftpStream = require('ftp-stream');

var connectionInfo = {
  host: 'ftp.secret.info',
  user: 'walter',
  port: 1234
};

ftpStream(connectionInfo,['secret.txt'])
.pipe(fs.dest('./output'));

Releasing

Travis has been configured to publish upon tagged commits; run the following for npm to update the version and push the appropriate commits to trigger a deploy from Travis.

npm version

License

Copyright (c) 2015, Phillip Green II. Licensed under the MIT license.

About

This is wraps `ftp` to provide a streaming interface for downloading files via FTP.

Resources

License

Stars

Watchers

Forks

Packages