@types/ftps
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published

Installation

npm install --save @types/ftps

Summary

This package contains type definitions for ftps (https://github.com/Atinux/node-ftps#readme).

Details

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

index.d.ts

export = FTP;

declare namespace FTP {
    interface FTPOptions {
        host: string;
        port?: number | undefined;
        protocol?: string | undefined;
        username?: string | undefined;
        password?: string | undefined;
        bareCredentials?: string | undefined;
        escape?: boolean | undefined;
        retries?: number | undefined;
        timeout?: number | undefined;
        retryInterval?: number | undefined;
        retryIntervalMultiplier?: number | undefined;
        requiresPassword?: boolean | undefined;
        autoConfirm?: boolean | undefined;
        cwd?: string | undefined;
        additionalLftpCommands?: string | undefined;
        requireSSHKey?: boolean | undefined;
        sshKeyPath?: string | undefined;
        sshKeyOptions?: string | undefined;
    }

    interface MirrorOptions {
        remoteDir?: string | undefined;
        localDir?: string | undefined;
        options?: string | undefined;
        upload?: boolean | undefined;
        parallel?: boolean | number | undefined;
        filter?: any;
    }

    interface FTPResults {
        data: string | null;
        error: Error | null;
    }

    type FTPCallbackFunction = (err: Error | null, results: FTPResults) => any;
}

declare class FTP {
    constructor(options: FTP.FTPOptions);

    raw(cmd: string): FTP;
    ls(): FTP;
    pwd(): FTP;
    cd(directory: string): FTP;
    cat(path: string): FTP;
    put(localPath: string, remotePath: string): FTP;
    addFile(localPath: string, remotePath: string): FTP;
    get(remotePath: string, localPath: string): FTP;
    getFile(remotePath: string, localPath: string): FTP;
    mv(from: string, to: string): FTP;
    move(from: string, to: string): FTP;
    rm(...paths: string[]): FTP;
    remove(...paths: string[]): FTP;
    rmdir(...paths: string[]): FTP;
    mirror(options: FTP.MirrorOptions): FTP;

    exec(cmdsOrCallback: string | string[] | FTP.FTPCallbackFunction, callback?: FTP.FTPCallbackFunction): any;
    execAsStream(cmds: string | string[]): any;
    // Helpers
    escapeshell(cmd: string): string;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

These definitions were written by Christos Panagiotakopoulos.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/ftps

Weekly Downloads

662

Version

1.2.2

License

MIT

Unpacked Size

6.73 kB

Total Files

5

Last publish

Collaborators

  • types