MCPcopy Create free account
hub / github.com/anus-dev/ANUS / createTmpDir

Function createTmpDir

packages/test-utils/src/file-system-test-helpers.ts:85–91  ·  view source on GitHub ↗
(
  structure: FileSystemStructure,
)

Source from the content-addressed store, hash-verified

83 * @returns A promise that resolves to the absolute path of the created temporary directory.
84 */
85export 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.

Callers 4

crawler.test.tsFile · 0.85
ignore.test.tsFile · 0.85
fileSearch.test.tsFile · 0.85

Calls 1

createFunction · 0.85

Tested by

no test coverage detected