export interface DirectorySnapshotDirectoryMetadata { hasVisibleDescendant: boolean; materializedEntries: Entry[]; snapshot?: DirectorySnapshot; } export interface PersistedDirectoryFileEntry { kind: 'file'; path: string; byteLength?: number; } export interface PersistedDirectoryDirectoryEntry { kind: 'directory'; path: string; snapshot: PersistedDirectorySnapshotV1; } export type PersistedDirectoryEntry = PersistedDirectoryFileEntry | PersistedDirectoryDirectoryEntry; export interface PersistedDirectoryFlatEntry { kind: 'file' | 'directory'; path: string; } export interface PersistedDirectorySnapshotV1 { version: 2; path: string; hasVisibleDescendant: boolean; shouldIncludeSelf: boolean; lastValidatedAt: number; filterSignature: string; sortSignature: string; workspaceChangeToken?: string | null; dependencySignatures: Array<[string, string]>; entries: PersistedDirectoryEntry[]; flatEntries: PersistedDirectoryFlatEntry[]; } export interface DirectorySnapshotRestoreFactory { createDirectory(path: string): DirectoryType; createFile(path: string, options?: { byteLength?: number; }): Entry; } export type PersistedEntryMetadata = { kind: 'file'; path: string; byteLength?: number; entry: Entry; } | { kind: 'directory'; path: string; entry: DirectoryType; snapshot: DirectorySnapshot; }; export declare class DirectorySnapshot { #private; constructor(options: { entries: Entry[]; directories: Map>; shouldIncludeSelf: boolean; hasVisibleDescendant: boolean; dependencies?: Map; lastValidatedAt?: number; path: string; filterSignature?: string; sortSignature?: string; workspaceChangeToken?: string | null; materializedEntriesFactory?: () => Entry[]; persistedEntries?: PersistedEntryMetadata[]; }); readonly shouldIncludeSelf: boolean; hasVisibleDescendant: boolean; materialize(): Entry[]; getDirectoryMetadata(directory: DirectoryType): DirectorySnapshotDirectoryMetadata | undefined; getDependencies(): Map | undefined; getLastValidatedAt(): number; getWorkspaceChangeToken(): string | null | undefined; setWorkspaceChangeToken(token: string | null | undefined): void; toPersistedSnapshot(): PersistedDirectorySnapshotV1; static fromPersistedSnapshot(payload: PersistedDirectorySnapshotV1, factory: DirectorySnapshotRestoreFactory): DirectorySnapshot; private static restorePersistedSnapshot; markValidated(timestamp?: number): void; } export declare function isPersistedDirectorySnapshotV1(value: unknown): value is PersistedDirectorySnapshotV1; export declare function createDirectorySnapshot(options: { entries: Entry[]; directories?: Map>; shouldIncludeSelf: boolean; hasVisibleDescendant: boolean; dependencies?: Map; lastValidatedAt?: number; path?: string; filterSignature?: string; sortSignature?: string; workspaceChangeToken?: string | null; materializedEntriesFactory?: () => Entry[]; persistedEntries?: PersistedEntryMetadata[]; }): DirectorySnapshot;