import { Client } from 'ssh2'; import { QueuifiedSFTP } from './queuifiedSftp'; import { SftpSyncConfig, SftpSyncOptions } from './config'; /** * Creates a new SftpDeploy instance * @class */ export declare class SftpSync { /** * Config object */ config: SftpSyncConfig; /** * Options object */ options: SftpSyncOptions; /** * SSH2 Client */ client: Client; /** * Promisified SFTP wrapper with queue */ queuifiedSftp: QueuifiedSFTP; /** * Local directory root */ localRoot: string; /** * Remote directory root */ remoteRoot: string; /** * Whether a SSH2 connection has been made or not */ private connected; /** * Constructor */ constructor(config: SftpSyncConfig, options?: SftpSyncOptions); /** * Make SSH2 connection */ connect(): Promise; /** * Close SSH2 connection */ close(): void; /** * Sync with specified path */ sync(relativePath?: string, isRootTask?: boolean): Promise; /** * Upload file/directory */ upload(relativePath: string, isRootTask?: boolean): Promise; /** * Remove a remote file or directory */ removeRemote(relativePath: string, isRootTask?: boolean): Promise; /** * No operation */ noop(): Promise; /** * Create a directory on a remote host */ createRemoteDirectory(relativePath: string): Promise; /** * Build a local and remote files status report for the specified path */ private buildSyncTable(relativePath); /** * Get an async version of sftp stream */ private initQueuifiedSftp(concurrency?); /** * Get a full path of a local file or directory */ private localFullPath(relativePath); /** * Get a full path of a remote file or directory */ private remoteFullPath(relativePath); }