pulp

Skred Virtual File System

The VFS under parts/exp-vfs/ is compiled into the main SKRED API. It provides disk, file-backed ZIP, and memory-backed ZIP mounts behind one file/directory interface. Skode loaders and filesystem commands use it, and the public functions are installed through include/skred/skred_vfs.h.

The implementation maintains a VFS-relative current working directory. Paths are lexically resolved before disk or ZIP lookup; . and .. are collapsed without allowing ZIP navigation above the mounted root. In disk mode, an absolute path selects a real directory or file. Prefix a loader path with file: when a ZIP is mounted and the command must bypass the mount.

Build and Dependencies

The main CMake build compiles:

The separate Makefile and test program in this directory are useful for isolated VFS development. The older top-level vfs/ directory is a standalone prototype and is not the implementation linked into SKRED.

Mount Lifecycle

skred_vfs_init() is a compatibility alias for skred_vfs_mount().

File and Directory API

The stdio-like API is:

Disk mode delegates to ordinary stdio and directory calls. ZIP reads extract a member to an owned memory buffer. ZIP writes buffer a member and add it when the handle closes; archive finalization occurs during unmount/shutdown.

Whole-file helpers are:

Skode Surface

The main user-facing commands are:

File, wave, Skode, and Ksynth loaders search the mounted VFS first, then the real current directory and their type-specific fallback directories. See SKODE_USER_COMMAND_REFERENCE.md for command syntax and search behavior.