Under heavy development. This site describes the intended 1.0 language. Current features and performance vary. Development status
Sn50SnThe SnAPI programming language
Development · Evolving reference

DirectoryEntry

Owns a native filename and an optional advisory type hint. Name is one relative component, not an absolute/openable path by itself. It preserves non-Unicode native units. Enumeration movement/advance/cleanup never invalidates this owner. Kind is absent when the OS does not provide a hint; even present hints are not stable metadata or a race-free access guarantee. This value allocates through Path ownership and adds no synchronization.

Sn is under heavy development. This reference includes the intended 1.0 design; features may be incomplete in the current compiler. Read the status →

Module std.fs

import std.fs;

Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.

DirectoryEntry

pub final class DirectoryEntry

Owns a native filename and an optional advisory type hint. Name is one relative component, not an absolute/openable path by itself. It preserves non-Unicode native units. Enumeration movement/advance/cleanup never invalidates this owner. Kind is absent when the OS does not provide a hint; even present hints are not stable metadata or a race-free access guarantee. This value allocates through Path ownership and adds no synchronization.

DirectoryEntry.Name

pub Name: Path;

Exact owned native component, independent of cursor lifetime.

DirectoryEntry.Kind

pub Kind: FileKind?;

Optional advisory target-provided type hint.

DirectoryEntry.init

pub init(mut Name: Path, Kind: FileKind?)

Transfers native name ownership without copying. Name: Owned relative native component. Kind: Optional advisory kind.

Documentation snapshot: October 24, 2026 About versions ↗
Searching Development · language & standard library