import { type Result } from '@fgv/ts-utils'; import type { IHttpStorageProvider, IStorageFileResponse, IStorageSyncResponse, IStorageTreeItem } from './model'; import type { IHttpStorageProviderFactory } from './provider'; /** * Options for creating filesystem-backed storage providers. * @public */ export interface IFsStorageProviderFactoryOptions { readonly rootPath: string; } /** * Filesystem-backed implementation of {@link IHttpStorageProvider}. * @public */ export declare class FsStorageProvider implements IHttpStorageProvider { private readonly _rootPath; constructor(rootPath: string); getItem(itemPath: string): Promise>; getChildren(itemPath: string): Promise>>; getFile(itemPath: string): Promise>; saveFile(itemPath: string, contents: string, contentType?: string): Promise>; deleteFile(itemPath: string): Promise>; createDirectory(itemPath: string): Promise>; sync(): Promise>; private _resolveAbsolutePath; private _toTreeItem; } /** * Normalizes a request path to a consistent POSIX format. * @public */ export declare function normalizeRequestPath(requestPath: string): string; /** * Namespace-aware provider factory backed by filesystem directories. * @public */ export declare class FsStorageProviderFactory implements IHttpStorageProviderFactory { private readonly _rootPath; constructor(options: IFsStorageProviderFactoryOptions); forNamespace(namespace?: string): Result; } /** * Sanitize namespace path segment. * @public */ export declare function sanitizeNamespace(namespace?: string): Result; //# sourceMappingURL=fsProvider.d.ts.map