MCPcopy
hub / github.com/ChromeDevTools/chrome-devtools-mcp / saveTemporaryFile

Method saveTemporaryFile

src/McpContext.ts:774–786  ·  view source on GitHub ↗
(
    data: Uint8Array<ArrayBufferLike>,
    filename: string,
  )

Source from the content-addressed store, hash-verified

772 }
773
774 async saveTemporaryFile(
775 data: Uint8Array<ArrayBufferLike>,
776 filename: string,
777 ): Promise<{filepath: string}> {
778 const filepath = await getTempFilePath(filename);
779 await this.validatePath(filepath);
780 try {
781 await fs.writeFile(filepath, data);
782 } catch (err) {
783 throw new Error('Could not save a file', {cause: err});
784 }
785 return {filepath};
786 }
787
788 async saveFile(
789 data: Uint8Array<ArrayBufferLike>,

Callers 3

lighthouse.tsFile · 0.80
screenshot.tsFile · 0.80
tools.tsFile · 0.80

Calls 2

validatePathMethod · 0.95
getTempFilePathFunction · 0.85

Tested by

no test coverage detected