mirror of
https://github.com/SabreTools/SabreTools.IO.git
synced 2026-11-15 16:41:58 +00:00
6dddf7db378755009fb6edc7cffe01955b04abef
* Do not follow linked directories in SafeGetFiles outside of Windows SafeGetFiles with SearchOption.AllDirectories follows directory symlinks. On Linux, the UDF view of some PC/Mac hybrid discs has symlinks whose target reads as empty, and each one resolves to its own folder, so the recursion never ends (fixes #2, SabreTools/BinaryObjectScanner#276). Outside of Windows, walk the tree one directory at a time and do not enter directories that carry FileAttributes.ReparsePoint. Files are matched with Directory.GetFiles per directory, so the pattern behaves as before, and the order is the same breadth-first order. Windows keeps Directory.GetFiles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Do not follow linked directories in the other AllDirectories overloads SafeGetDirectories and the SafeEnumerateDirectories, SafeEnumerateFiles and SafeEnumerateFileSystemEntries wrappers follow directory symlinks in the same way. On Linux, with one directory linked to itself, SafeEnumerateFiles returns 43 files instead of 2, and with three such links it is still running after 10 seconds. The walk from SafeGetFiles is now a lazy iterator that all of them share, so the Enumerate wrappers stay lazy. Each directory is listed with the matching overload without SearchOption (Directory.GetFiles, SafeEnumerateFiles and so on), so patterns and inaccessible directories behave as in the recursive search. If the attributes of a subdirectory cannot be read, such as below a directory without execute permission, it is entered anyway, so it fails in the same way as in the recursive search. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Check for linked directories without catching exceptions DirectoryInfo.Exists returns false where the attributes cannot be read, and the criteria for the walk are checked one at a time with their reasons. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
SabreTools.IO
This meta-library contains core functionality classes that is used by other SabreTools projects. The original version of the package which includes all namespaces below is in the SabreTools.IO.Meta directory.
Find the link to the Nuget package here.
Namespaces
Below are a list of the included namespaces with links to their README files:
- SabreTools.Collections.Extensions
- SabreTools.IO
- SabreTools.IO.Compression
- SabreTools.IO.Extensions
- SabreTools.Logging
- SabreTools.Matching
- SabreTools.Numerics
- SabreTools.Numerics.Extensions
- SabreTools.Security.Cryptography
- SabreTools.Text.ClrMamePro
- SabreTools.Text.Compare
- SabreTools.Text.Extensions
- SabreTools.Text.INI
- SabreTools.Text.SeparatedValue
Releases
For the most recent stable build, download the latest release here: Releases Page
For the latest WIP build here: Rolling Release
Description
Releases
20
Languages
C#
99.8%
Shell
0.1%
PowerShell
0.1%