JustBash.FS.POSIX protocol (JustBash v0.4.0)
View SourcePOSIX filesystem extensions that are not part of VFS.Mountable.
The vfs protocol deliberately keeps its surface to ten universal
operations; symlinks, hard links, permission bits, and append are
POSIX-specific concepts that most virtual backends (git trees, S3
objects, DB rows) cannot express. This secondary protocol carries
them for the backends that can — today JustBash.FS.Memory — while
every other VFS.Mountable gets graceful degradation through the
Any fallback:
lstat/2falls back toVFS.stat/2(no symlinks means stat and lstat agree)readlink/2returns:einval(nothing is ever a symlink)symlink/3andlink/3return:enotsupchmod/3is a validated no-op (succeeds if the path exists)append_file/3composes read + write
A %VFS{} mount table implements this protocol by routing to the
backend that owns the path, exactly as it routes the core operations.
All returns follow the vfs conventions: state threads back on success,
errors are %VFS.Error{} structs.
Summary
Types
Functions
@spec append_file(t(), path(), binary()) :: {:ok, t()} | {:error, VFS.Error.t()}
@spec chmod(t(), path(), non_neg_integer()) :: {:ok, t()} | {:error, VFS.Error.t()}
@spec link(t(), path(), path()) :: {:ok, t()} | {:error, VFS.Error.t()}
@spec lstat(t(), path()) :: {:ok, VFS.Stat.t(), t()} | {:error, VFS.Error.t()}
@spec readlink(t(), path()) :: {:ok, String.t(), t()} | {:error, VFS.Error.t()}
@spec symlink(t(), String.t(), path()) :: {:ok, t()} | {:error, VFS.Error.t()}