Closed Vbitz closed 2 weeks ago
This commit adds the first step towards that https://github.com/tinyrange/pkg2/commit/40b22275a150651f9cffecd2b4ac63f3219976ef
It adds a new heretical filesystem API. This is not yet exposed to the shell_context
system.
v2 includes this new filesystem. It's not yet POSIX-compliant but that will happen as I keep working on the shell emulator system.
Right now the file system handling code is highly simplified with a simple array of files (and directories) for the
.tar
archives. The git repository handling code is better in this regard with a tree structure that can be navigated though.I'd like to take this a few steps further and provide a POSIX like interface to all archives. For example you should be able to do...
Indexing into a filesystem or a directory is like calling
open
and file handles can be passed around or copied between filesystems (since the filesystem doesn't represent real contents on disk but rather a in-memory structure.The POSIX side is necessary for #5 since Makefiles and the shell rely on a POSIX-compliant filesystem as a base.