Skip to content

Commit 0266394

Browse files
committed
Release 1.110.2025
1 parent 7f957f9 commit 0266394

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

Functions/GenXdev.FileSystem/Rename-InProject.ps1

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,10 @@ function Rename-InProject {
122122
[IO.Directory]::GetDirectories($dir, "*") | ForEach-Object {
123123

124124
if ([IO.Path]::GetFileName($_) -notin @(".svn", ".git")) {
125-
Get-ProjectFiles $_ $mask | ForEach-Object {
126-
$result.Add($_)
127-
} | Out-Null
125+
$null = Get-ProjectFiles $_ $mask | ForEach-Object {
126+
127+
$null = $result.Add($_)
128+
}
128129
}
129130
}
130131

@@ -151,8 +152,11 @@ function Rename-InProject {
151152

152153
if ($content -ne $newContent) {
153154
if ($PSCmdlet.ShouldProcess($filePath, "Replace content")) {
155+
154156
$utf8 = [Text.UTF8Encoding]::new($false)
157+
155158
[IO.File]::WriteAllText($filePath, $newContent, $utf8)
159+
156160
Write-Verbose "Updated content in: $filePath"
157161
}
158162
}
@@ -171,7 +175,7 @@ function Rename-InProject {
171175

172176
if ($PSCmdlet.ShouldProcess($filePath, "Rename file")) {
173177
try {
174-
Move-ItemWithTracking -Path $filePath -Destination $newPath
178+
$null = Move-ItemWithTracking -Path $filePath -Destination $newPath
175179
Write-Verbose "Renamed file: $filePath -> $newPath"
176180
}
177181
catch {
@@ -204,12 +208,12 @@ function Rename-InProject {
204208
# merge directories if target exists
205209
Start-RoboCopy -Source $dir.FullName `
206210
-DestinationDirectory $newPath -Move
207-
Remove-AllItems ($dir.FullName) -DeleteFolder
211+
$null = Remove-AllItems ($dir.FullName) -DeleteFolder
208212
Write-Verbose "Merged directory: $($dir.FullName) -> $newPath"
209213
}
210214
else {
211215
try {
212-
Move-ItemWithTracking -Path $dir.FullName -Destination $newPath
216+
$null = Move-ItemWithTracking -Path $dir.FullName -Destination $newPath
213217
Write-Verbose "Renamed directory: $($dir.FullName) -> $newPath"
214218
}
215219
catch {

GenXdev.FileSystem.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
RootModule = 'GenXdev.FileSystem.psm1'
88

99
# Version number of this module.
10-
ModuleVersion = '1.106.2025'
10+
ModuleVersion = '1.110.2025'
1111

1212
# ID used to uniquely identify this module
1313
GUID = '2f62080f-0483-4421-8497-b3d433b65171'

0 commit comments

Comments
 (0)