Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ftps

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ftps

FTP, FTPS and SFTP client for node.js, mainly a lftp wrapper.

  • 0.1.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6K
decreased by-10.55%
Maintainers
1
Weekly downloads
 
Created
Source

node-ftps

FTP, FTPS and SFTP client for node.js, mainly a lftp wrapper.

Requirements

You need to have the executable lftp installed on your computer.

Installation

npm install ftps

Usage

var FTPS = require('ftps');
var ftps = new FTPS({
  host: 'domain.com', // required
  username: 'Test', // required
  password: 'Test', // required
  protocol: 'sftp', // optional, values : 'ftp', 'sftp', 'ftps',... default is 'ftp'
  // protocol is added on beginning of host, ex : sftp://domain.com in this case
});
// Do some amazing things
ftps.cd('myDir').addFile(__dirname + '/test.txt').exec(console.log);

Some documentation

Here are chainable fonctions :

ftps.ls()
ftps.pwd()
ftps.cd(directory)
ftps.cat(pathToRemoteFiles)
ftps.put(pathToLocalFile) // alias: addFile
ftps.rm(pathToRemoteFiles)

Execute a command on the remote server :

ftps.raw('ls -l')

To see all available commands -> http://lftp.yar.ru/lftp-man.html

For information, ls, pwd, ... rm are just some alias of raw() method.

Run the commands !

ftps.exec(function (err, res) {
  // err is stderr from lftp or null if no errors
  // res is stdout from lftp command
});

Why?

Just because I didn't found sftp and ftps module in node.js, it's pretty dirty to spawn lftp command, but sorry, it does the work for me, maybe for you too :) Ah and sorry for tests, it's a hack, so I just do some manual tests.

Keywords

FAQs

Package last updated on 27 Feb 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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