/**
 * @license
 * Copyright 2025 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import * as fs from 'fs';
import * as path from 'path';
/**
 * Reads file contents from a given path
 */
export function readPath(filePath) {
    return fs.readFileSync(filePath, 'utf-8');
}
/**
 * Checks if a path exists
 */
export function pathExists(filePath) {
    return fs.existsSync(filePath);
}
/**
 * Reads directory contents
 */
export function readDirectory(dirPath) {
    return fs.readdirSync(dirPath);
}
/**
 * Gets path information
 */
export function getPathInfo(filePath) {
    const exists = fs.existsSync(filePath);
    let isFile = false;
    let isDirectory = false;
    if (exists) {
        const stats = fs.statSync(filePath);
        isFile = stats.isFile();
        isDirectory = stats.isDirectory();
    }
    return {
        exists,
        isFile,
        isDirectory,
        basename: path.basename(filePath),
        dirname: path.dirname(filePath),
        extension: path.extname(filePath),
    };
}
//# sourceMappingURL=pathReader.js.map