import { CommandRegistry } from "../ipc";
import type { FileStats, SearchResult } from "@edenapp/types";
/**
 * FilesystemManager
 *
 * Manages filesystem operations and path resolution.
 */
export declare class FilesystemManager {
    private baseDir;
    private handler;
    constructor(baseDir: string, commandRegistry: CommandRegistry);
    /**
     * Get the base directory (user directory)
     */
    getBaseDir(): string;
    /**
     * Resolve a masked path (as seen by apps) to an absolute filesystem path.
     *
     * @param targetPath - The masked path (e.g., "/file.json" or "/Documents/notes.txt")
     * @returns The resolved absolute path (e.g., "/home/user/.eden/file.json")
     * @throws Error if the path attempts to escape the base directory
     */
    resolvePath(targetPath: string): string;
    /**
     * Convert an absolute filesystem path back to a masked path (as seen by apps).
     *
     * @param absolutePath - The absolute filesystem path
     * @returns The masked path relative to the base directory
     * @throws Error if the path is outside the base directory
     */
    toMaskedPath(absolutePath: string): string;
    /**
     * Check if a path is within the allowed base directory
     */
    isPathAllowed(targetPath: string): boolean;
    /**
     * Read the contents of a file.
     */
    readFile(targetPath: string, encoding?: BufferEncoding): Promise<string>;
    /**
     * Write content to a file, creating directories if needed.
     */
    writeFile(targetPath: string, content: string, encoding?: BufferEncoding): Promise<void>;
    /**
     * Check if a file or directory exists.
     */
    exists(targetPath: string): Promise<boolean>;
    /**
     * Create a directory and any necessary parent directories.
     */
    mkdir(targetPath: string): Promise<void>;
    /**
     * List contents of a directory.
     */
    readdir(targetPath: string): Promise<string[]>;
    /**
     * Get file or directory statistics.
     */
    stat(targetPath: string): Promise<FileStats>;
    /**
     * Search for files and directories using glob patterns.
     */
    search(basePath: string, pattern: string, limit?: number): Promise<SearchResult[]>;
    /**
     * Delete a file or directory.
     * For directories, removes recursively.
     */
    delete(targetPath: string): Promise<void>;
}
//# sourceMappingURL=FilesystemManager.d.ts.map