Closed shmuelie closed 3 years ago
In the MemoryFileSystem, when enumerating paths, the contents of the SortedSet<UPath> are returned using a foreach with a yield instead of simply returning the SortedSet<UPath> itself. Any reason for this?
MemoryFileSystem
SortedSet<UPath>
Yes, that's because SortedSet<UPath> is valid for a single folder, and we can visit all folders:
https://github.com/xoofx/zio/blob/87c7172ff63f4fb4785af2f0437485be7043c80e/src/Zio/FileSystems/MemoryFileSystem.cs#L770
Ah yes, I missed where the loop was happening, thought it was outside the while. Thanks!
In the
MemoryFileSystem
, when enumerating paths, the contents of theSortedSet<UPath>
are returned using a foreach with a yield instead of simply returning theSortedSet<UPath>
itself. Any reason for this?