src/stdlib/bounded_filesystem.panack
Green: covered; red: known zero; amber: unavailable. Blank lines are outside the executable-start-line denominator.
1 pub import stdlib/host::{HostError} 2 3 pub read_chunk(file: Path, offset: Nat, limit: Nat): Result[Bytes, HostError] { 4 fs_read_chunk(file, offset, limit) 5 } 6 7 pub atomic_write(file: Path, data: Bytes): Result[Unit, HostError] { 8 fs_atomic_write(file, data) 9 } 10 11 // Read at most 4096 native target bytes, without following the final link or 12 // symlinked ancestors. The relative path must remain below root. 13 pub read_link(root: Path, relative: Path): Result[Bytes, HostError] { 14 fs_read_link(root, relative) 15 } 16
Functions
[
{
"id": "declaration/1",
"name": "read_chunk",
"line": 3,
"state": "covered",
"entries": "5"
},
{
"id": "declaration/2",
"name": "atomic_write",
"line": 7,
"state": "covered",
"entries": "3"
},
{
"id": "declaration/3",
"name": "read_link",
"line": 13,
"state": "covered",
"entries": "8"
}
]Source branch outcomes
[]
Reviewed declaration exclusions
[
{
"id": "declaration/0",
"reason": "import",
"line": 1
}
]