* Creates a unique temporary directory synchronously. * @param {string} prefix The prefix for the temp directory * @returns {string} The full path of the created directory
(prefix)
| 522 | * @returns {string} The full path of the created directory |
| 523 | */ |
| 524 | mkdtempSync(prefix) { |
| 525 | const providerPrefix = this.#toProviderPath(prefix); |
| 526 | // Generate random 6-character suffix like Node does |
| 527 | const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
| 528 | let suffix = ''; |
| 529 | for (let i = 0; i < 6; i++) { |
| 530 | suffix += chars[(MathRandom() * chars.length) | 0]; |
| 531 | } |
| 532 | const dirPath = providerPrefix + suffix; |
| 533 | this[kProvider].mkdirSync(dirPath); |
| 534 | return this.#toMountedPath(dirPath); |
| 535 | } |
| 536 | |
| 537 | /** |
| 538 | * Opens a directory synchronously. |
no test coverage detected