Skip to content

Commit

Permalink
example with long paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ninmonkey committed Apr 15, 2024
1 parent f010a5b commit c8147ee
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions Pwsh/IO/TestNewLongPaths.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,29 @@ $info = [ordered]@{
'b' * 240 -join '' ) )

( Test-Path $scaryPathFolder ) ? '' : ( mkdir $scaryPathFolder )
( $scaryLog = Join-String -f '{0}\SomeFile.log' -in $scaryPathFolder )#
Get-Date | Set-Content -path $scaryLog

$info.ScaryPath = $ScaryPathFolder
$info.ScaryPath_Length = $ScaryPathFolder.length
$info.ScaryPath = $ScaryPathFolder
$info.ScaryPath_Length = $ScaryPathFolder.length
$info.ScaryPath_SegLengths = $scaryPathFolder -split '\\'
| Join-String -p { $_.Length } -sep ', '

$info.ScaryLog = $scaryLog
$info.ScaryLog_NameLength = (gi $scaryLog).FullName.Length
$Info.ScaryLog_FileSize = ( gi $ScaryLog ).Length
# $Info | Add-Member -force -pass -ea 'ignore' -NotePropertyMembers @{
# ScaryPath = $ScaryPathFolder
# ScaryPath_Length = $ScaryPathFolder.length
# ScaryPath_SegLengths = $scaryPathFolder -split '\\'
# | Join-String -p { $_.Length } -sep ', '
# }
$Info

(pwd) -split '\\' | Join-String -op 'SegmentLengths for Pwd: ' -sep ', ' { $_.Length }

@'
notes:
extra notes:
Here's a couple of details on MAX_PATH I hadn't ran across
There's a few causes how `LongPathsEnabled` is ignored
Expand Down

0 comments on commit c8147ee

Please sign in to comment.