MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / assertRegularFile

Function assertRegularFile

src/file-limits.ts:60–62  ·  view source on GitHub ↗
(stats: fs.Stats)

Source from the content-addressed store, hash-verified

58const READ_CHUNK_BYTES = 64 * 1024;
59
60function assertRegularFile(stats: fs.Stats): void {
61 if (!stats.isFile()) throw new Error('Source path is not a regular file');
62}
63
64/**
65 * Read a source file without ever holding more than the limit plus one byte.

Callers 2

readBoundedSourceFunction · 0.85
readBoundedSourceSyncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected