@phroun/paged-buffer
Version:
High-performance buffer system for editing massive files with intelligent memory management and undo/redo capabilities
44 lines • 1.18 kB
TypeScript
/**
* File-based page storage implementation
*/
/// <reference types="node" />
/// <reference types="node" />
import { PageStorage } from './page-storage';
/**
* File-based page storage implementation
*/
declare class FilePageStorage extends PageStorage {
private tempDir;
constructor(tempDir?: string);
private _ensureTempDir;
savePage(pageKey: string, data: Buffer): Promise<void>;
loadPage(pageKey: string): Promise<Buffer>;
deletePage(pageKey: string): Promise<void>;
pageExists(pageKey: string): Promise<boolean>;
/**
* Get the directory where pages are stored
*/
getTempDir(): string;
/**
* Get all stored page keys (useful for debugging/cleanup)
*/
getAllPageKeys(): Promise<string[]>;
/**
* Get storage statistics
*/
getStorageStats(): Promise<{
pageCount: number;
totalBytes: number;
directory: string;
}>;
/**
* Clean up all stored pages
*/
cleanup(): Promise<void>;
/**
* Remove the temporary directory entirely
*/
destroy(): Promise<void>;
}
export { FilePageStorage };
//# sourceMappingURL=file-page-storage.d.ts.map