Skip to content

Commit

Permalink
AirUtils.psm1: Rename EnsureDir to EnsureDirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
wordpure committed Aug 24, 2024
1 parent d3081a0 commit fb4d78c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/AirUtils.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function EnsureFile {
}
}

function EnsureDir {
function EnsureDirectory {
[CmdletBinding()]
param (
[Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true, ValueFromRemainingArguments = $true)]
Expand All @@ -73,7 +73,7 @@ function EnsureSetContent {
)

$directory = Split-Path -Path $FilePath -Parent
EnsureDir $directory
EnsureDirectory $directory
Set-Content -Path $FilePath -Value $Content -Encoding $Encoding -Force
}

Expand All @@ -94,7 +94,7 @@ function EnsureHardLink {

$parentDir = Split-Path -Parent $Link
if (!(Test-Path $parentDir)) {
EnsureDir $parentDir
EnsureDirectory $parentDir
}

if (Test-Path $Link) {
Expand Down Expand Up @@ -146,7 +146,7 @@ function RedirectDirectory {
}
}

EnsureDir $PersistDir
EnsureDirectory $PersistDir

if (!(Test-Path $DataDir)) {
New-Item -ItemType Junction -Path $DataDir -Target $PersistDir | Out-Null
Expand Down Expand Up @@ -240,4 +240,4 @@ function RemoveStartMenuItem {
}
}

Export-ModuleMember -Function WriteLog, TestDirectoryEmpty, EnsureFile, EnsureDir, EnsureSetContent, EnsureHardLink, RemoveHardLink, RedirectDirectory, RemoveJunction, RemoveDesktopShortcut, RemoveStartMenuItem
Export-ModuleMember -Function WriteLog, TestDirectoryEmpty, EnsureFile, EnsureDirectory, EnsureSetContent, EnsureHardLink, RemoveHardLink, RedirectDirectory, RemoveJunction, RemoveDesktopShortcut, RemoveStartMenuItem

0 comments on commit fb4d78c

Please sign in to comment.