(
data: Uint8Array<ArrayBufferLike>,
filename: string,
)
| 782 | } |
| 783 | |
| 784 | async saveTemporaryFile( |
| 785 | data: Uint8Array<ArrayBufferLike>, |
| 786 | filename: string, |
| 787 | ): Promise<{filepath: string}> { |
| 788 | const filepath = await getTempFilePath(filename); |
| 789 | await this.validatePath(filepath); |
| 790 | try { |
| 791 | await fs.writeFile(filepath, data); |
| 792 | } catch (err) { |
| 793 | throw new Error('Could not save a file', {cause: err}); |
| 794 | } |
| 795 | return {filepath}; |
| 796 | } |
| 797 | |
| 798 | async saveFile( |
| 799 | data: Uint8Array<ArrayBufferLike>, |
no test coverage detected