IF Commons GitHub

physical/verbs/write

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0004-anyfs-cli-surfaces FR-011

The verbs of the program that change a store through the POSIX view (commons anyfs-cli 0004-anyfs-cli-surfaces FR-011): put, mkdir, touch, cp, mv and rm. A file is copied by one read and one write that is checked against the digest of its bytes; a directory is copied or moved by a plan of the bridge, which is the plan of a sync and approved by its hash like one. rm of a directory is a plan too: the names it would remove and the hash of that list, which --plan-hash pins. A run with --dry-run changes nothing and says what it would do; the verbs that destroy say so in their facts, and Headless asks for the confirmation.

import { writeVerbs } from "./write.ts";
// writeVerbs(host).map((v) => v.name); // ["put", "mkdir", "touch", "cp", "mv", "rm"]

Source: commons/anyfs-cli/src/physical/verbs/write.ts

0 of 2 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

writeVerbsfunctionno test imports it
function writeVerbs(host: Host): readonly Command[]

The verbs that change a store through the view.

removalHashfunctionno test imports it
function removalHash(paths: readonly string[]): Promise<string>

The hash of the names a recursive removal would remove, in order: what --plan-hash pins.

Titles, headings, exports, tables, columns and requirements. Esc closes.