// src/lib/file/tryReadFileSync.ts
import { existsSync, readFileSync } from "node:fs";

// src/lib/file/ReadFileSyncOptions.ts
var defaultReadFileSyncOptions = { encoding: "utf8" };

// src/lib/file/tryReadFileSync.ts
var tryReadFileSync = (uri, options = defaultReadFileSyncOptions) => {
  return existsSync(uri) ? readFileSync(uri, options) : void 0;
};
export {
  tryReadFileSync
};
//# sourceMappingURL=tryReadFileSync.mjs.map
