Centralize method for creating temporary directories
This commit is contained in:
parent
f4198ff39d
commit
f99b180f98
2 changed files with 8 additions and 7 deletions
scripts/Windows/Scripts
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue