universal-file-client
Version:
Universal file transfer client with unified interface for FTP, SFTP, and HTTP protocols
19 lines • 773 B
TypeScript
import { ProtocolAdapter, ConnectionConfig, FileInfo } from '../types';
export declare class HttpAdapter implements ProtocolAdapter {
private config;
private isConnected;
connect(config: ConnectionConfig): Promise<void>;
disconnect(): Promise<void>;
list(_path?: string): Promise<FileInfo[]>;
download(remotePath: string): Promise<Buffer>;
upload(_localPath: string, _remotePath: string): Promise<void>;
stat(filePath: string): Promise<FileInfo | null>;
exists(filePath: string): Promise<boolean>;
lastModified(filePath: string): Promise<Date | null>;
private isValidUrl;
getFileInfo(filePath: string): Promise<{
isJson: boolean;
lastModified: Date | null;
}>;
}
//# sourceMappingURL=http-adapter.d.ts.map