FileSystemTools/FileSystemTools.ps1
function NewContainerSharedTempDirectory($ContainerName) { $sharedPaths = Get-NavContainerSharedFolders -containerName $ContainerName $objectsTempPath = Join-Path -Path ($sharedPaths.Keys.Split(" ")[0]) -ChildPath ([guid]::NewGuid()) $tempDir = New-Item $objectsTempPath -ItemType Directory return $tempDir } function IsDirectory($Path) { return Test-Path -Path $Path -PathType Container } function NewTempFile() { $tempFilePath = Join-Path -Path (GetTempDirectory) -ChildPath "$(GenerateGuid).txt" return New-Item -Path $tempFilePath -ItemType File } function GetTempDirectory() { return $env:TEMP } function GenerateGuid() { return [guid]::NewGuid(); } |