import { FileSystemInterface } from './FileSystemInterface.js'; /** * Remote file system implementation * * This class implements the FileSystemInterface using SSH to communicate with a remote server. */ export declare class RemoteFileSystem implements FileSystemInterface { private baseDir; private sshUtils; /** * Creates a new RemoteFileSystem instance * * @param baseDir - Base directory for file operations on the remote server * @param sshKeyPath - Path to the SSH private key file * @param remoteUser - Username for the remote server * @param remoteHost - Hostname or IP address of the remote server * @param options - Optional SSH configuration (debugMode, strictHostKeyChecking) */ constructor(baseDir: string, sshKeyPath: string, remoteUser: string, remoteHost: string, options?: { debugMode?: boolean; strictHostKeyChecking?: boolean; }); /** * Gets the full POSIX path for a relative path * Uses POSIX path joining regardless of host OS to ensure remote paths are correct * * @param relativePath - Relative path * @returns Full POSIX path */ private getFullPath; /** * Checks if a file or directory exists * * @param relativePath - Relative path to check * @returns True if the path exists, false otherwise */ fileExists(relativePath: string): Promise; /** * Checks if a path is a directory * * @param relativePath - Relative path to check * @returns True if the path is a directory, false otherwise */ isDirectory(relativePath: string): Promise; /** * Checks if a path is a file * * @param relativePath - Relative path to check * @returns True if the path is a file, false otherwise */ isFile(relativePath: string): Promise; /** * Ensures a directory exists, creating it if necessary * * @param relativePath - Relative path to the directory */ ensureDirectory(relativePath: string): Promise; /** * Reads a file's contents * * @param relativePath - Relative path to the file * @returns The file contents as a string */ readFile(relativePath: string): Promise; /** * Writes content to a file * * @param relativePath - Relative path to the file * @param content - Content to write */ writeFile(relativePath: string, content: string): Promise; /** * Appends content to a file over SSH * * Falls back to read + writeFile when native append is not available. * * @param relativePath - Relative path to the file * @param content - Content to append */ appendFile(relativePath: string, content: string): Promise; /** * Lists files in a directory * * @param relativePath - Relative path to the directory * @returns Array of file names */ listFiles(relativePath: string): Promise; /** * Deletes a file or directory * * @param relativePath - Relative path to delete */ delete(relativePath: string): Promise; /** * Copies a file or directory * * @param sourceRelativePath - Relative source path * @param destRelativePath - Relative destination path */ copy(sourceRelativePath: string, destRelativePath: string): Promise; /** * Gets the base directory for file operations * * @returns The base directory path */ getBaseDir(): string; /** * Tests the SSH connection to the remote server * * @returns True if connection is successful, false otherwise */ testConnection(): Promise; } //# sourceMappingURL=RemoteFileSystem.d.ts.map