module

ContributorMural::WorkspaceFile

Reads a file the config named by a repository-relative path. The config validator rejects .. and absolute paths lexically; what is left is what only the filesystem can answer — a missing file, a symlink that leads out of the repository, a file too large to take. Each caller words those in its own vocabulary, so the reason comes back as a value.

Class methods

read(workspace : String, path : String, limit : Int) : Bytes
Source
writable?(workspace : String, path : String) : Bool

Whether writing path stays inside the workspace once symlinks are followed. Judged on the deepest part of it that already exists, so it can be asked before any directory on the way is created — mkdir_p through a linked directory would otherwise build the rest of the path outside.

Source

Nested types