(
data: Uint8Array<ArrayBufferLike>,
filename: string,
)
| 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>, |
no test coverage detected