import type { Stats } from 'node:fs';
import type { LifecycleContext } from '../types';
import type { MarkdocError } from '../../types/index.js';
export type FileInfo = {
    relativePath: string;
    realRelativePath: string;
    dirname: string;
    isVirtual?: boolean;
};
/**
 * Information about fs acccess operations.
 * Type of operation.
 *   load - loading file content using our Cache loaders
 *   read - reading file content
 *   exists - checking if file exists
 *   readdir - reading directory content
 *   scan - scanning directory content deeply with support of regexp to match some specific files
 *   dependencies - array of string dependencies provided as an argument react-style
 */
export type AccessRecord = {
    type: 'load';
    loaderKey: string;
    cacheKey: string;
    hash: string;
} | {
    type: 'read' | 'exists' | 'readdir';
    path: string;
    hash: string;
} | {
    type: 'scan';
    path: string;
    hash: string;
    pattern?: RegExp;
} | {
    type: 'dependencies';
    hash: string;
};
export type LoadResult<T> = {
    /**
     * Hash of the file content combined with all the fs operations that were used to get this content.
     */
    compoundHash: string;
    data: T;
};
export type LoaderFn<T = unknown> = (resource: string, context: LifecycleContext, reportError: (error: Error | MarkdocError) => void) => Promise<T>;
export type FsEvent = {
    event: 'add' | 'change' | 'unlink';
    path: string;
    stats?: Stats;
} | {
    event: 'code-updated';
};
//# sourceMappingURL=fs.d.ts.map