aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os
diff options
context:
space:
mode:
authorRyan Liptak <squeek502@hotmail.com>2022-10-05 03:17:52 -0700
committerRyan Liptak <squeek502@hotmail.com>2022-10-05 03:27:25 -0700
commit274d19575ea1ebaea593cdca7c5afa8303153cb4 (patch)
treecdfc0fdc70ae18f08a6e1e5faf2c4455c32f5391 /lib/std/os
parente9889cd25ff219f2f5ac7a336c4f99a577b19d44 (diff)
downloadzig-274d19575ea1ebaea593cdca7c5afa8303153cb4.tar.gz
zig-274d19575ea1ebaea593cdca7c5afa8303153cb4.zip
fs: Optimize Dir.deleteTree for non-deeply-nested directories
`deleteTree` now uses a stack-allocated stack for the first 16 nested directories, and then falls back to the previous implementation (which only keeps 1 directory open at a time) when it runs out of room in its stack. This allows the function to perform as well as a recursive implementation for most use-cases without needing allocation or introducing the possibility of stack overflow.
Diffstat (limited to 'lib/std/os')
0 files changed, 0 insertions, 0 deletions