MCPcopy
hub / github.com/exceljs/exceljs / readFile

Method readFile

lib/csv/csv.js:32–41  ·  view source on GitHub ↗
(filename, options)

Source from the content-addressed store, hash-verified

30 }
31
32 async readFile(filename, options) {
33 options = options || {};
34 if (!(await exists(filename))) {
35 throw new Error(`File not found: ${filename}`);
36 }
37 const stream = fs.createReadStream(filename);
38 const worksheet = await this.read(stream, options);
39 stream.close();
40 return worksheet;
41 }
42
43 read(stream, options) {
44 options = options || {};

Callers

nothing calls this directly

Calls 3

readMethod · 0.95
existsFunction · 0.85
closeMethod · 0.80

Tested by

no test coverage detected