UNPKG

nestjs-basic-ftp

Version:
19 lines (18 loc) 892 B
/// <reference types="node" /> import { FileInfo, FTPResponse, UploadOptions } from 'basic-ftp'; import { Readable, Writable } from 'stream'; import { IFTPOptions } from './interface/options.interface'; export declare class FtpService { private _options; private readonly _ftpClient; private logger; constructor(_options: IFTPOptions); list(path?: string): Promise<FileInfo[]>; downloadTo(destination: Writable | string, fromRemotePath: string, startAt?: number): Promise<FTPResponse>; downloadToDir(localDirPath: string, remoteDirPath?: string): Promise<void>; uploadFrom(source: Readable | string, toRemotePath: string, options?: UploadOptions): Promise<FTPResponse>; remove(path: string, ignoreErrorCodes?: boolean): Promise<FTPResponse>; size(path: string): Promise<number>; trackProgress(fileListing?: FileInfo[]): void; private access; }