DirectoryIterator
Owns consuming directory traversal and transfers independent entry owners. Successful EOF is sticky. Next yields one error item then ends, preventing repeated terminal failures. External synchronization is required; destruction closes remaining enumeration synchronously. No raw native entry or borrowed name escapes.
Module std.fs
import std.fs;Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.
DirectoryIterator
pub final class DirectoryIteratorOwns consuming directory traversal and transfers independent entry owners. Successful EOF is sticky. Next yields one error item then ends, preventing repeated terminal failures. External synchronization is required; destruction closes remaining enumeration synchronously. No raw native entry or borrowed name escapes.
DirectoryIterator.init
pub init()Creates an inert allocation-free cursor.
DirectoryIterator.init
pub init(Source: readonly Self&) = delete;Rejects duplicated traversal authority. Source: Existing cursor.
DirectoryIterator.init
pub init(Source: mut Self&&)Transfers remaining enumeration and terminal state. Source: Cursor left exhausted.
DirectoryIterator.operator
pub fn operator =(Source: readonly Self&) -> void = delete;Rejects duplicated enumeration authority. Source: Existing cursor. Return: No runtime result; this assignment is deleted and cannot be invoked.
DirectoryIterator.operator
pub fn operator =(Source: mut Self&&) -> void = delete;Requires explicit owner cleanup before replacement. Source: Existing cursor. Return: No runtime result; this assignment is deleted and cannot be invoked.
DirectoryIterator.Next
pub fn Next() -> Result<DirectoryEntry, IoError>?Transfers one owned entry result, yielding a terminal error only once. Return: Optional Result item, or none after EOF/error/inert movement. Warning: May allocate/block; consume each Result before treating it as an entry.