Motivation
FileManager.enumerator(at:) and FileManager.enumerator(atPath:) doesn't work on WASI since their underlying NSURLDirectoryEnumerator is just a stub on WASI.
The reason why it was a stub was that NSURLDirectoryEnumerator heavily used FTS and the wasi-libc didn't support it then.
https://github.com/apple/swift-corelibs-foundation/pull/4898/files#diff-dd2c49919954783c5266a5dce970eb43c41de6f017c12ad3474afd038f971c5fR1123
Proposed solution
FTS has been supported since wasi-libc 25, and swiftlang/swift main branch and release/6.3 branch are already using the greater version of wasi-libc than 25.
So we can use the proper NSURLDirectoryEnumerator on WASI as well.
Alternatives considered
No response
Additional information
I have already created PRs.
Motivation
FileManager.enumerator(at:)andFileManager.enumerator(atPath:)doesn't work on WASI since their underlyingNSURLDirectoryEnumeratoris just a stub on WASI.The reason why it was a stub was that
NSURLDirectoryEnumeratorheavily used FTS and the wasi-libc didn't support it then.https://github.com/apple/swift-corelibs-foundation/pull/4898/files#diff-dd2c49919954783c5266a5dce970eb43c41de6f017c12ad3474afd038f971c5fR1123
Proposed solution
FTS has been supported since wasi-libc 25, and swiftlang/swift main branch and release/6.3 branch are already using the greater version of wasi-libc than 25.
So we can use the proper
NSURLDirectoryEnumeratoron WASI as well.Alternatives considered
No response
Additional information
I have already created PRs.
NSURLDirectoryEnumeratoron WASI #5418NSURLDirectoryEnumeratoron WASI #5419