Skip to content

armgit / Ix

Public Imported from GitHub
0

Understand any codebase instantly. System intelligence for codebases, built for humans and AI.

343 B
Raw Blame
// Copyright 2026 Ix Infrastructure Inc.

import * as fs from "node:fs";

/** Read file content safely, returning null if inaccessible. */
export function readFileContent(filePath: string): string | null {
  try {
    if (!fs.existsSync(filePath)) return null;
    return fs.readFileSync(filePath, "utf-8");
  } catch {
    return null;
  }
}