/// import { Client } from 'ssh2'; import * as Bluebird from 'bluebird'; import { AsyncSFTPWrapper } from './asyncSftpWrapper'; 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 stream */ sftpAsync: AsyncSFTPWrapper; /** * 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(): Bluebird; /** * Close SSH2 connection */ close(): void; /** * Sync with specified path */ sync(relativePath?: string, isRootTask?: boolean): Bluebird; /** * Upload file/directory */ upload(relativePath: string, isRootTask?: boolean): Bluebird; /** * Remove a remote file or directory */ removeRemote(relativePath: string, isRootTask?: boolean): Bluebird; /** * No operation */ noop(): Bluebird; /** * Create a directory on a remote host */ private createRemoteDirectory(relativePath); /** * Build a local and remote files status report for the specified path */ private buildSyncTable(relativePath); /** * Get an async version of sftp stream */ private getAsyncSftp(); /** * Get a full path of a local file or directory */ private localFullPath(relativePath); /** * Get a full path of a local file or directory */ private remoteFullPath(relativePath); }