All files

src/stdlib/filesystem_stage.panack

Green: covered; red: known zero; amber: unavailable. Blank lines are outside the executable-start-line denominator.

    1 // Invocation-scoped private staging directories. Publishing consumes the handle.
    2 pub import stdlib/host::{HostError}
    3 
    4 pub begin(parent: Path): Result[Nat, HostError] {
    5   fs_stage_begin(parent)
    6 }
    7 
    8 pub path(handle: Nat): Result[Path, HostError] {
    9   fs_stage_path(handle)
   10 }
   11 
   12 pub directory(handle: Nat, relative: Path): Result[Unit, HostError] {
   13   fs_stage_directory(handle, relative)
   14 }
   15 
   16 pub write(handle: Nat, relative: Path, data: Bytes, offset: Nat): Result[Unit, HostError] {
   17   fs_stage_write(handle, relative, data, offset)
   18 }
   19 
   20 // Create a new link without following any destination ancestor. The caller owns
   21 // target policy; target is stored verbatim and is never opened by this operation.
   22 pub symlink(handle: Nat, relative: Path, target: Path): Result[Unit, HostError] {
   23   fs_stage_symlink(handle, relative, target)
   24 }
   25 
   26 pub publish(handle: Nat, name: Path, replace: Bool): Result[Unit, HostError] {
   27   fs_stage_publish(handle, name, replace)
   28 }
   29 
   30 pub close(handle: Nat): Result[Unit, HostError] {
   31   fs_stage_close(handle)
   32 }
   33 

Functions

[
  {
    "id": "declaration/1",
    "name": "begin",
    "line": 4,
    "state": "covered",
    "entries": "2"
  },
  {
    "id": "declaration/2",
    "name": "path",
    "line": 8,
    "state": "covered",
    "entries": "1"
  },
  {
    "id": "declaration/3",
    "name": "directory",
    "line": 12,
    "state": "covered",
    "entries": "1"
  },
  {
    "id": "declaration/4",
    "name": "write",
    "line": 16,
    "state": "covered",
    "entries": "2"
  },
  {
    "id": "declaration/5",
    "name": "symlink",
    "line": 22,
    "state": "covered",
    "entries": "7"
  },
  {
    "id": "declaration/6",
    "name": "publish",
    "line": 26,
    "state": "covered",
    "entries": "1"
  },
  {
    "id": "declaration/7",
    "name": "close",
    "line": 30,
    "state": "covered",
    "entries": "2"
  }
]

Source branch outcomes

[]

Reviewed declaration exclusions

[
  {
    "id": "declaration/0",
    "reason": "import",
    "line": 2
  }
]