Structureswift-nio 2.81.0_NIOFileSystem
DirectoryIterator
An AsyncIteratorProtocol
of DirectoryEntry
.
- iOS
- 13.0+
- macOS
- 10.15+
- tvOS
- 13.0+
- watchOS
- 6.0+
struct DirectoryIterator
An AsyncIteratorProtocol
of DirectoryEntry
.
struct DirectoryIterator
import _NIOFileSystem
A file system library for Swift.
struct DirectoryEntries
An AsyncSequence
of entries in a directory.
@preconcurrency init<S>(wrapping sequence: S) where S : Sendable, S : AsyncSequence, S.Element == [DirectoryEntry]
Creates a DirectoryEntries
sequence by wrapping an AsyncSequence
of batches of directory entries.
func batched() -> Batched
Returns a sequence of directory entry batches.
func makeAsyncIterator() -> DirectoryIterator
struct Batched
An AsyncSequence
of batches of directory entries.
typealias AsyncIterator = DirectoryIterator
typealias Element = DirectoryEntry
protocol AsyncIteratorProtocol<Element, Failure>
A type that asynchronously supplies the values of a sequence one at a time.
mutating func next() async throws -> DirectoryEntry?
mutating func next(isolation actor: isolated (any Actor)?) async throws(Self.Failure) -> Self.Element?
Default implementation of next()
in terms of next()
, which is required to maintain backward compatibility with existing async iterators.