Centralize method for creating temporary directories

This commit is contained in:
Manuel Thalmann 2023-06-16 20:25:43 +02:00
parent f4198ff39d
commit f99b180f98
2 changed files with 8 additions and 7 deletions
scripts/Windows/Scripts

View file

@ -53,4 +53,10 @@ class Context {
-Wait `
-NoNewWindow;
}
[string] GetTempDirectory() {
$tempDir = Join-Path $([System.IO.Path]::GetTempPath()) $([System.IO.Path]::GetRandomFileName());
$null = New-Item -ItemType Directory $tempDir;
return $tempDir;
}
}