MCPcopy Index your code
hub / github.com/simstudioai/sim / parseFile

Method parseFile

apps/sim/lib/file-parsers/csv-parser.ts:18–32  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

16
17export class CsvParser implements FileParser {
18 async parseFile(filePath: string): Promise<FileParseResult> {
19 if (!filePath) {
20 throw new Error('No file path provided')
21 }
22
23 if (!existsSync(filePath)) {
24 throw new Error(`File not found: ${filePath}`)
25 }
26
27 const stream = createReadStream(filePath, {
28 highWaterMark: CONFIG.STREAM_CHUNK_SIZE,
29 })
30
31 return this.parseStream(stream)
32 }
33
34 async parseBuffer(buffer: Buffer): Promise<FileParseResult> {
35 const bufferSize = buffer.length

Callers

nothing calls this directly

Calls 1

parseStreamMethod · 0.95

Tested by

no test coverage detected