Skip to main content

Module create

Module create 

Source
Expand description

drive sheets create engine — creates a spreadsheet and optionally seeds its cells (issue #1589, ADR-0073 §11).

Mirrors create.rs with a fixed spreadsheet MIME type rather than composing it, deliberately. drive::create::create logs internally and unconditionally — that non-bypassability is the point of it — so composing it would emit a phantom ["drive", "create"] record for a command the user never typed, alongside this verb’s own. One user-visible verb, one gate check, one log record.

The seeding write only checks for an explicit SheetsWrite deny, never the bare default policy, and that is a decision rather than an oversight. Routing it through the ordinary sheets write engine (which honors default-deny like every other write) would re-run the gate under SheetsWrite against the new file’s parents, which defaults to deny when no rule mentions sheets-write at all — so sheets create --values would create an empty spreadsheet and then report itself blocked on every folder that only grants create. The Create verdict alone authorises the pair, unless an operator has gone out of their way to add an explicit deny: ["sheets-write"] rule on this folder — that is a deliberate signal this module still honors, distinguished from “no rule at all” via write_gate::Decision::decided_by. This is only defensible because the target id is always the one files.create just returned inside an already-cleared folder, never a caller-supplied id; drive upload sets the precedent of writing content under Upload rather than Edit.

Structs§

CreateOptions
Per-call options.
CreateOutcome
The full outcome of one attempt.

Enums§

CreateResult
What happened (or, under --dry-run, would happen).

Functions§

create
Creates a spreadsheet, optionally seeding its cells.
describe
Renders an outcome as a single human-readable line.