Under heavy development. This site describes the intended 1.0 language. Current features and performance vary. Development status
Sn50SnThe SnAPI programming language
0.2.0 Preview 1 · Frozen documentation

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. Reference extracted from this release’s bundled standard library. Public API examples are not an exhaustive compatibility test. Read the matching release guide for tested workflows and limitations. 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