MCPcopy Create free account
hub / github.com/LibPDF-js/core / saveOutput

Function saveOutput

examples/utils.ts:56–66  ·  view source on GitHub ↗
(filename: string, data: Uint8Array)

Source from the content-addressed store, hash-verified

54 * ```
55 */
56export async function saveOutput(filename: string, data: Uint8Array): Promise<string> {
57 const fullPath = join(OUTPUT_PATH, filename);
58
59 // Ensure directory exists
60 await mkdir(dirname(fullPath), { recursive: true });
61
62 // Write the file
63 await writeFile(fullPath, data);
64
65 return fullPath;
66}
67
68/**
69 * Format bytes as a human-readable size string.

Callers 15

mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected