Module

PuduLangDocgen.Docset.Walk

View source

Confined reads of a project folder and its files

Functions

Name Description
files Every regular file under a folder as a portable relative path, sorted. Hidden entries, ignored folders, the `skip` folders, and symbolic links are left out.
texts The text of files by relative path; unreadable files are reported and left out.
text The text of one file inside the folder.
bytes The bytes of one file inside the folder.

files

fn files(base: Str, skip: &Array[Str]) -> Result[Array[Str], Array[Docgen.Diagnostic]]

Every regular file under a folder as a portable relative path, sorted. Hidden entries, ignored folders, the skip folders, and symbolic links are left out.

Parameters

base
Str
skip
&Array[Str]

Returns

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

View source

texts

fn texts(base: Str, paths: &Array[Str]) -> (Map[Str, Str], Array[Docgen.Diagnostic])

The text of files by relative path; unreadable files are reported and left out.

Parameters

base
Str
paths
&Array[Str]

Returns

(Map[Str, Str], Array[Docgen.Diagnostic])

View source

text

fn text(base: Str, path: Str) -> Result[Str, Docgen.Diagnostic]

The text of one file inside the folder.

Parameters

base
Str
path
Str

Returns

Result[Str, Docgen.Diagnostic]

View source

bytes

fn bytes(base: Str, path: Str) -> Result[Bytes, Docgen.Diagnostic]

The bytes of one file inside the folder.

Parameters

base
Str
path
Str

Returns

Result[Bytes, Docgen.Diagnostic]

View source