UNPKG

digitaltwin-core

Version:

Minimalist framework to collect and handle data in a Digital Twin project

29 lines 1.16 kB
import { StorageService } from '../storage_service.js'; /** * Local filesystem-based implementation of the StorageService. * Saves files in a configured folder using a timestamp as filename. */ export declare class LocalStorageService extends StorageService { private baseDir; constructor(baseDir?: string); /** * Saves the given buffer to disk under a unique filename. * @param buffer - Content to save * @param collectorName - Name of the collector (used for folder) * @param extension - Optional file extension (e.g. 'json', 'txt') * @returns Relative path to the saved file */ save(buffer: Buffer, collectorName: string, extension?: string): Promise<string>; /** * Retrieves a file as buffer using its relative path. * @param relativePath - Filename previously returned by `save` * @returns File content as Buffer */ retrieve(relativePath: string): Promise<Buffer>; /** * Deletes a stored file. * @param relativePath - Filename previously returned by `save` */ delete(relativePath: string): Promise<void>; } //# sourceMappingURL=local_storage_service.d.ts.map