Skip to main content

Module service

Module service 

Source
Expand description

The FileSystemService boundary: the only door to the real filesystem.

Per ADR-0005 §3 these methods are blocking and synchronous. They are called only from the filesystem worker thread, so the non-blocking guarantee comes from where they run, not from async fn. That keeps the trait object-safe, keeps the in-memory fake trivial, and avoids colouring the codebase async before Phase 03 needs it.

This shape is the template GitService, PtyService, and LanguageService follow.

The data types themselves live in core because termesh_core::AppMessage has to carry them across the worker/state boundary; they are re-exported here so callers only ever need one import.

Structs§

DirEntryInfo
One entry in a directory listing.

Enums§

EntryKind
What a directory entry is, determined without following symlinks — a symlink reports as EntryKind::Symlink whatever it points at (ADR-0005 §6).
FsError
Filesystem failures, in the vocabulary the explorer actually needs.

Traits§

FileSystemService
Read and mutate the filesystem. Widgets and the agent reach the OS only through this (CONTRIBUTING.md invariants, ARCHITECTURE.md §7.4) — never std::fs directly.

Functions§

sort_entries
Apply the FileSystemService::read_dir ordering contract.

Type Aliases§

FsResult