Proposal: Filesystem & IO library (Fs / Path / Mime) — saves, config, mods, assets #10
Labels
No labels
area:ci
area:docs
area:input
area:net
area:rendering
area:repo
area:stdlib
area:tooling
area:types
cleanup
dx
priority:high
priority:low
priority:medium
proposal
status:in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: workshopsoft/ludic#10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
A cohesive Filesystem & IO library: OS paths, reading/writing files,
directory listing, existence checks, and basic MIME/type sniffing — the
foundation for saves, config, mods, and asset loading.
Some low-level pieces already exist as bare builtins (
file_*,read_char).This issue is about wrapping them into one safe, ergonomic, namespaced API a
non-expert can use without thinking about file descriptors or byte buffers.
Why it matters for game devs
.ludicor data files a player dropped in.Proposed API (illustrative)
Namespaces:
Fs.*(read/write/exists/list/mkdir/remove/copy),Path.*(join/dir/base/ext/normalize — cross-platform separators),Mime.*(extension + magic-byte sniff).Considerations
issue) — non-experts get a recoverable failure, never a crash.
Fs.save_dir(),Fs.assets_dir()); make escaping it explicit. Important for safety and for afuture web/wasm target where the FS is virtual.
Scope / acceptance
Fs,Path,Mimenamespaces with the ops above.Related: error handling, Unicode, OS interface, #2 (stdlib).