hexo/node_modules/sftp-sync-deploy/lib/queuifiedSftp.d.ts

23 lines
1.0 KiB
TypeScript
Raw Normal View History

2023-10-03 11:14:36 +08:00
/// <reference types="node" />
import { SFTPWrapper, Client } from 'ssh2';
import { InputAttributes, TransferOptions, FileEntry, Stats } from 'ssh2-streams';
import Queue from 'queue';
export declare class QueuifiedSFTP {
sftp: SFTPWrapper;
queue: Queue;
started: boolean;
paused: boolean;
private constructor();
static init(client: Client, concurrency?: number): Promise<QueuifiedSFTP>;
fastPut(localPath: string, remotePath: string, options?: TransferOptions): Promise<void>;
open(filename: string, mode: string, attributes?: InputAttributes): Promise<Buffer>;
writeData(handle: Buffer, buffer: Buffer, offset: number, length: number, position: number): Promise<any>;
close(handle: Buffer): Promise<void>;
mkdir(path: string, attributes?: InputAttributes): Promise<void>;
rmdir(path: string): Promise<void>;
readdir(location: string | Buffer): Promise<FileEntry[]>;
unlink(path: string): Promise<void>;
lstat(path: string): Promise<Stats>;
private run(method, args);
}