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

Method parseFile

apps/sim/lib/file-parsers/docx-parser.ts:21–33  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

19
20export class DocxParser implements FileParser {
21 async parseFile(filePath: string): Promise<FileParseResult> {
22 try {
23 if (!filePath) {
24 throw new Error('No file path provided')
25 }
26
27 const buffer = await readFile(filePath)
28 return this.parseBuffer(buffer)
29 } catch (error) {
30 logger.error('DOCX file error:', error)
31 throw new Error(`Failed to parse DOCX file: ${(error as Error).message}`)
32 }
33 }
34
35 async parseBuffer(buffer: Buffer): Promise<FileParseResult> {
36 try {

Callers

nothing calls this directly

Calls 3

parseBufferMethod · 0.95
readFileFunction · 0.85
errorMethod · 0.80

Tested by

no test coverage detected