Log inGet started
What it does

fs_utils

Filesystem helpers for the desktop UI's virtual filesystem. Lists a directory in DesktopConfig.VFS (or an override) and resolves the display icon for a single entry. Stateless wrappers over the static config tree.

Exports

  • M.listDirectory(path: string, vfs: VfsTree?) -> { VfsEntry } — return a new array of entries at path, sorted directories-first then by name. Empty array if the path isn't present.
  • M.resolveEntryIcon(entry: VfsEntry, config: DesktopConfigLike?) -> string — pick the best icon path for an entry: direct icon_src wins, otherwise the entry's world/app_id is looked up via findShortcut, otherwise the default folder/file icon.

Types:

  • VfsEntry = { name, kind, icon_src?, content?, world?, app_id? }
  • VfsTree = { [string]: { VfsEntry } }
  • DesktopConfigLike = { VFS, ICON_FOLDER, ICON_FILE, findShortcut }

Usage

local FsUtils = require("@builtin::modules.fs_utils")

local entries = FsUtils.listDirectory("/apps")
for _, entry in ipairs(entries) do
    local icon = FsUtils.resolveEntryIcon(entry)
    print(entry.name, entry.kind, icon)
end

Notes

  • listDirectory always returns a fresh array (shallow copy of the config row) — callers can mutate the result without affecting the shared DesktopConfig.VFS.
  • Sort order is stable: dir entries come before non-dir, then alphabetical by name.
  • resolveEntryIcon uses DesktopConfig.findShortcut (or the override), which is a linear scan — fine for the current ~9-entry shortcut list.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

This asset doesn't declare a schema or structured payload.

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

0items
This part has no composite children. See the Files segment for its leaf payloads.
This part has no leaf payloads.

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.