Module
PuduLangDocgen.Docset.Publish
Confined, incremental writing of a validated plan
Functions
| Name | Description |
|---|---|
publish |
Writes a plan under an output folder. Files whose content matches the previous build's record are left untouched unless `force` is set; files the previous build wrote that this plan no longer has are removed. The record is kept in the `state` file. |
place |
A text file replaced in one step: written beside its target with the usual file mode, then renamed over it, so readers never see a partial file. The folder is created when missing. |
placeBytes |
A binary file replaced in one step, like `place`. |
publish
fn publish(root: Str, plan: &Docgen.Plan, state: Str, force: Bool) -> Result[Docgen.Report, Array[Docgen.Diagnostic]]
Writes a plan under an output folder. Files whose content matches the previous build's
record are left untouched unless force is set; files the previous build wrote that this
plan no longer has are removed. The record is kept in the state file.
Parameters
rootStrplan&Docgen.PlanstateStrforceBool
Returns
Result[Docgen.Report, Array[Docgen.Diagnostic]]
place
fn place(path: Str, text: Str) -> Result[(), Array[Docgen.Diagnostic]]
A text file replaced in one step: written beside its target with the usual file mode, then renamed over it, so readers never see a partial file. The folder is created when missing.
Parameters
pathStrtextStr
Returns
Result[(), Array[Docgen.Diagnostic]]
placeBytes
fn placeBytes(path: Str, content: &Bytes) -> Result[(), Array[Docgen.Diagnostic]]
A binary file replaced in one step, like place.
Parameters
pathStrcontent&Bytes
Returns
Result[(), Array[Docgen.Diagnostic]]