import type { FileReadableStream, FileSystem } from './FileSystem.ts'; import type { DirectoryEntry } from './types.ts'; export interface SnapshotContentIdOptions { fresh?: boolean; kind?: 'any' | 'file'; strictHermetic?: boolean; } export interface Snapshot { readonly id: string; readDirectory(path?: string): Promise; readFile(path: string): Promise; readFileBinary(path: string): Promise; readFileStream(path: string): FileReadableStream; fileExists(path: string): Promise; getFileLastModifiedMs(path: string): Promise; getFileByteLength(path: string): Promise; isFilePathGitIgnored(path: string): boolean; isFilePathExcludedFromTsConfigAsync(path: string, isDirectory?: boolean): Promise; getRelativePathToWorkspace(path: string): string; contentId(path: string, options?: SnapshotContentIdOptions): Promise; getWorkspaceChangeToken?(rootPath: string): Promise; getWorkspaceChangedPathsSinceToken?(rootPath: string, previousToken: string): Promise | null>; getRecentlyInvalidatedPaths?(): ReadonlySet | undefined; invalidatePath(path: string): void; invalidatePaths?(paths: Iterable): void; invalidateAll?(): void; onInvalidate(listener: (path: string) => void): () => void; } export declare class FileSystemSnapshot implements Snapshot { #private; readonly id: string; constructor(fileSystem: FileSystem, providedId?: string); readDirectory(path?: string): Promise; readFile(path: string): Promise; readFileBinary(path: string): Promise; readFileStream(path: string): FileReadableStream; fileExists(path: string): Promise; getFileLastModifiedMs(path: string): Promise; getRelativePathToWorkspace(path: string): string; getFileByteLength(path: string): Promise; isFilePathGitIgnored(path: string): boolean; isFilePathExcludedFromTsConfigAsync(path: string, isDirectory?: boolean): Promise; contentId(path: string, options?: SnapshotContentIdOptions): Promise; getWorkspaceChangeToken(rootPath: string): Promise; getWorkspaceChangedPathsSinceToken(rootPath: string, previousToken: string): Promise | null>; invalidatePath(path: string): void; invalidatePaths(paths: Iterable): void; invalidateAll(): void; onInvalidate(listener: (path: string) => void): () => void; }