Launch Week Day 3: Introducing Organization Notifications in Socket.Learn More
Socket
Book a DemoSign in
Socket

@gdc-js/gdc-collector-ftp

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gdc-js/gdc-collector-ftp

An FTP generic data collector

latest
Source
npmnpm
Version
0.5.0
Version published
Maintainers
1
Created
Source

The FTP data collector

A GDC module for collection of files through FTP. Can collect multiple files by using multiple targets. Can collect multiple files by using the '*' and '?' wildcards (the wildcards can be used any number of times in any target)

Efficiency

The FTP tree scanning algorithm was built to only scan directories which can potentially match at least one of the targets, thus skipping irrelevant directories.

Progress reporting

The tree scanning phase (which determines which files to collect) progress is not reported because there is no way to know in advance the size of the tree. Notification are sent per scanned sub directory, so it's possible to understand that it's progressing.

Usage example:



const GDCCollectorFtp = require('../gdc-collector-ftp');
const {GDCCallbackDataReceiver} = require('@gdc-js/common');
const {GDCLogNotificationHandler} = require('@gdc-js/common');

const ftpCollector = new GDCCollectorFtp({
      properties: {
        'host': 'demo.wftpserver.com',
        'username': 'demo',
        'password': 'demo',
      },
      dataReceiver: new GDCCallbackDataReceiver((data, meta) => {
        console.log(data);
        console.log(meta);
      }),
      notificationHandler: new GDCLogNotificationHandler(),
    });
ftpCollector.collect(['/download/*.jpg']);

Keywords

ftp

FAQs

Package last updated on 16 Aug 2020

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