Skip to main content

Module content_edit

Module content_edit 

Source
Expand description

Drive file content edit — replaces an existing file’s content (issue #1574, ADR-0071).

The most structurally distinct of the three mutating verbs: unlike create/upload (whose gate chain starts at the caller-given --parent), edit’s chain starts at the target’s current parent folder(s) — files.get first, then folder_ancestry::resolve_decision_for_parents resolves and combines a decision per parent for a legacy multi-parent file (mirrors visibility.rs’s existing multi-parent-union contract; shared with drive permissions check’s identical file-target case). An orphan file with no parent degenerates to the bare default policy, correctly, via an empty chain.

Still single-target, so this follows create.rs/upload.rs’s linear- function shape, not file_move.rs’s batch Plan/Execute.

Structs§

EditOptions
Per-call edit options.
EditOutcome
The planned (and, after a real run, final) outcome of one edit call.

Enums§

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

Functions§

edit
Replaces opts.file_id’s content with opts.content, gated by rules.