Skip to main content

Module container_workspace

Module container_workspace 

Source
Expand description

A container agent’s /workspace as a folder of the host.

A container agent’s machine is its container, whose /workspace is a folder of the host. A route that takes a path from it (widgets/install) names the folder as the agent sees it, and srv maps that to the host’s, after resolving symlinks, and refuses anything outside: a host path outside the workspace would reach the user’s ~/.ssh or ~/.aws.

Functions§

entry_inside 🔒
The entry raw names, itself: a link is not followed, because a rename acts on the name in its folder. The folder is resolved (links included) and must lie inside workspace. Returns the entry on the host, and the container’s name for its folder (/workspace/...).
host_spelling 🔒
raw as the host spells it, with nothing resolved yet: /workspace/... and a relative path lie under workspace, and a host path stands as given.
inside 🔒
raw as a path on the host, inside workspace. /workspace/... is the container’s name for it; a relative path is relative to it; a host path is accepted if it is inside it. Symlinks are resolved first.
workspace_of 🔒
Where the container’s /workspace is on the host: the block’s cmd:cwd, as the agent was started in it.