/** * Local filesystem storage controller */ import { StorageController, LocalStorageConfig } from "./types"; import { UploadFileProps, UploadFileResult, DownloadConfig, StorageListResult } from "@rebasepro/types"; /** * Local filesystem storage implementation * Stores files in a directory structure: {basePath}/{bucket}/{path} */ export declare class LocalStorageController implements StorageController { private config; private basePath; constructor(config: LocalStorageConfig); getType(): "local"; /** * Ensure directory exists, creating it if necessary */ private ensureDir; /** * Get the full filesystem path for a storage path. * Includes a path traversal guard to prevent escaping the base directory. */ private getFullPath; /** * Validate file before upload */ private validateFile; putObject({ file, key, metadata, bucket }: UploadFileProps): Promise; getSignedUrl(key: string, bucket?: string): Promise; getObject(key: string, bucket?: string): Promise; deleteObject(key: string, bucket?: string): Promise; listObjects(prefix: string, options?: { bucket?: string; maxResults?: number; pageToken?: string; }): Promise; /** * Get the absolute filesystem path for serving files * Used by the storage routes to serve files directly */ getAbsolutePath(key: string, bucket?: string): string; /** * Get the base path for the storage */ getBasePath(): string; }