/**
 * @license
 * Copyright 2025 Vybestack LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import { existsSync as fsExistsSync, readFileSync as fsReadFileSync } from 'fs';
/**
 * Real file system implementation using Node.js fs module.
 */
export class NodeFileSystem {
    existsSync(path) {
        return fsExistsSync(path);
    }
    readFileSync(path, encoding) {
        return fsReadFileSync(path, encoding);
    }
}
/**
 * Mock file system implementation for testing that doesn't read real files.
 */
export class MockFileSystem {
    mockFiles = new Map();
    existsSync(path) {
        return this.mockFiles.has(path);
    }
    readFileSync(path, _encoding) {
        const content = this.mockFiles.get(path);
        if (!content) {
            throw new Error(`ENOENT: no such file or directory, open '${path}'`);
        }
        return content;
    }
    /**
     * Set mock file content for testing.
     */
    setMockFile(path, content) {
        this.mockFiles.set(path, content);
    }
    /**
     * Clear all mock files.
     */
    clearMocks() {
        this.mockFiles.clear();
    }
}
//# sourceMappingURL=IFileSystem.js.map