Module

PuduLangDocgen.Docset.Publish

View source

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

root
Str
plan
&Docgen.Plan
state
Str
force
Bool

Returns

Result[Docgen.Report, Array[Docgen.Diagnostic]]

View source

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

path
Str
text
Str

Returns

Result[(), Array[Docgen.Diagnostic]]

View source

placeBytes

fn placeBytes(path: Str, content: &Bytes) -> Result[(), Array[Docgen.Diagnostic]]

A binary file replaced in one step, like place.

Parameters

path
Str
content
&Bytes

Returns

Result[(), Array[Docgen.Diagnostic]]

View source