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

@types/jsftp

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/jsftp

TypeScript definitions for jsftp

  • 2.1.2
  • ts3.7
  • ts3.8
  • ts3.9
  • ts4.0
  • ts4.1
  • ts4.2
  • ts4.3
  • ts4.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
243K
decreased by-4.93%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/jsftp

Summary

This package contains type definitions for jsftp (https://github.com/sergi/jsftp).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsftp.

index.d.ts

// Type definitions for jsftp 2.1
// Project: https://github.com/sergi/jsftp
// Definitions by: Konrad Księski <https://github.com/xyleen>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="node" />

import { Socket } from 'net';
import { EventEmitter } from 'events';

export interface JsftpOpts {
    host?: string | undefined;
    port?: number | undefined;
    user?: string | undefined;
    pass?: string | undefined;
    createSocket?: (({ port, host }: { port: number, host: string }, firstAction: () => {}) => Socket) | undefined;
    useList?: boolean | undefined;
}

export type ErrorCallback = (err: Error) => void;
export type RawCallback = (err: Error, data: { code: number, text: string }) => void;
export type ListCallback = (err: Error, dirContents: string) => void;
export type GetCallback = (err: Error, socket: Socket) => void;
export type LsCallback = (err: Error, res: [{ name: string }]) => void;

export default class Ftp extends EventEmitter {
    constructor(opts: JsftpOpts);

    ls(filePath: string, callback: LsCallback): void;

    list(filePath: string, callback: ListCallback): void;

    get(remotePath: string, callback: GetCallback): void;
    get(remotePath: string, localPath: string, callback: ErrorCallback): void;

    put(source: string | Buffer | NodeJS.ReadableStream, remotePath: string, callback: ErrorCallback): void;

    rename(from: string, to: string, callback: ErrorCallback): void;

    // Ftp.raw(command, params, callback)
    raw(command: string, callback: RawCallback): void;
    raw(command: string, arg1: any, callback: RawCallback): void;
    raw(command: string, arg1: any, arg2: any, callback: RawCallback): void;
    raw(command: string, arg1: any, arg2: any, arg3: any, callback: RawCallback): void;
    raw(command: string, arg1: any, arg2: any, arg3: any, arg4: any, callback: RawCallback): void;
    auth(user: string, pass: string, callback: RawCallback): void;
    keepAlive(timeInMs?: number): void;

    destroy(): void;
}

Additional Details

  • Last updated: Tue, 26 Oct 2021 17:01:24 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by Konrad Księski.

FAQs

Package last updated on 26 Oct 2021

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