@types/jsftp
TypeScript definitions for jsftp
Last updated 8 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/jsftp 
SYNC missed versions from official npm registry.

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

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

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

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, 07 Nov 2023 03:09:37 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Konrad Księski.

Current Tags

  • 2.1.5                                ...           latest (2 years ago)
  • 2.1.0                                ...           ts2.0 (8 years ago)
  • 2.1.0                                ...           ts2.1 (8 years ago)
  • 2.1.0                                ...           ts2.2 (8 years ago)
  • 2.1.0                                ...           ts2.3 (8 years ago)
  • 2.1.0                                ...           ts2.4 (8 years ago)
  • 2.1.0                                ...           ts2.5 (8 years ago)
  • 2.1.0                                ...           ts2.6 (8 years ago)
  • 2.1.0                                ...           ts2.7 (8 years ago)
  • 2.1.0                                ...           ts2.8 (8 years ago)
  • 2.1.0                                ...           ts2.9 (8 years ago)
  • 2.1.0                                ...           ts3.0 (8 years ago)
  • 2.1.0                                ...           ts3.1 (8 years ago)
  • 2.1.0                                ...           ts3.2 (8 years ago)
  • 2.1.0                                ...           ts3.3 (8 years ago)
  • 2.1.0                                ...           ts3.4 (8 years ago)
  • 2.1.0                                ...           ts3.5 (8 years ago)
  • 2.1.1                                ...           ts3.6 (5 years ago)
  • 2.1.2                                ...           ts3.7 (4 years ago)
  • 2.1.2                                ...           ts3.8 (4 years ago)
  • 2.1.2                                ...           ts3.9 (4 years ago)
  • 2.1.2                                ...           ts4.0 (4 years ago)
  • 2.1.2                                ...           ts4.1 (4 years ago)
  • 2.1.2                                ...           ts4.2 (4 years ago)
  • 2.1.2                                ...           ts4.3 (4 years ago)
  • 2.1.2                                ...           ts4.4 (4 years ago)
  • 2.1.5                                ...           ts4.5 (2 years ago)
  • 2.1.5                                ...           ts4.6 (2 years ago)
  • 2.1.5                                ...           ts4.7 (2 years ago)
  • 2.1.5                                ...           ts4.8 (2 years ago)
  • 2.1.5                                ...           ts4.9 (2 years ago)
  • 2.1.5                                ...           ts5.0 (2 years ago)
  • 2.1.5                                ...           ts5.1 (2 years ago)
  • 2.1.5                                ...           ts5.2 (2 years ago)
  • 2.1.5                                ...           ts5.3 (2 years ago)
  • 2.1.5                                ...           ts5.4 (2 years ago)
  • 2.1.5                                ...           ts5.5 (2 years ago)
  • 2.1.5                                ...           ts5.6 (2 years ago)
  • 2.1.5                                ...           ts5.7 (2 years ago)
  • 2.1.5                                ...           ts5.8 (2 years ago)
  • 2.1.5                                ...           ts5.9 (2 years ago)

6 Versions

  • 2.1.5                                ...           2 years ago
  • 2.1.4                                ...           2 years ago
  • 2.1.3                                ...           3 years ago
  • 2.1.2                                ...           4 years ago
  • 2.1.1                                ...           5 years ago
  • 2.1.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (2)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |