Buckets:
| const { join } = require('path') | |
| const { tmpdir } = require('os') | |
| const { unlinkSync } = require('fs') | |
| const files = [] | |
| let count = 0 | |
| function file () { | |
| const file = join(tmpdir(), `thread-stream-${process.pid}-${count++}`) | |
| files.push(file) | |
| return file | |
| } | |
| process.on('beforeExit', () => { | |
| for (const file of files) { | |
| try { | |
| unlinkSync(file) | |
| } catch (e) { | |
| // ignore cleanup errors | |
| } | |
| } | |
| }) | |
| module.exports.file = file | |
Xet Storage Details
- Size:
- 464 Bytes
- Xet hash:
- a2a8afc841e4d04fc919e2faa0a362b541fad9c0d1db307d966fe428853242ee
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.