( structure: FileSystemStructure, )
| 83 | * @returns A promise that resolves to the absolute path of the created temporary directory. |
| 84 | */ |
| 85 | export async function createTmpDir( |
| 86 | structure: FileSystemStructure, |
| 87 | ): Promise<string> { |
| 88 | const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), 'anus-cli-test-')); |
| 89 | await create(tmpDir, structure); |
| 90 | return tmpDir; |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * Cleans up (deletes) a temporary directory and its contents. |
no test coverage detected