[bldr]docs
Build APIbldr

DirectoryMember

A member whose content is a filesystem tree.

interface in bldr

A member whose content is a filesystem tree.

Properties

cid: string

property

The member's root content CID.

Kept first-class alongside the typed accessors: some callers genuinely want the string — mounting by CID, link(), a node-function input — rather than a build value.

kind: "directory"

property

name: string

property

The member's name in the workspace ("bldr/daemon", "linux-kernel").

options: Record<string, string>

property

This member's options from bldr-workspace.yml.

Values are strings — the Rust side is a BTreeMap<String, String> and the runtime's own Directory/Image say so too. This said unknown while the member object was a thing apart; now that it is the member module's default export it has to satisfy that contract, and unknown does not.

root: Directory

property

See Directory.

deprecated The previous name for rootDirectory. Removed from the controller's output, and kept here only until the controller that stops emitting it is the one deployed — the generated member object is cast to this type, so the type must not be narrower than what the running controller produces.

rootDirectory: Directory

property

The member's content as a build artifact — what you mount, compile or copy from.

const c = new Cargo({ scope, toolchain, source: member.rootDirectory });

See Directory.

.dir(path: string)

method

A subdirectory of this member's tree, read eagerly and returned as a Directory so it composes like any other.

dir(path: string): Promise<Directory>

See Directory.

.file(path: string)

method

The CID of a file in this member's tree, read eagerly.

The counterpart to rootDirectory, which is lazy and composes into the build graph. This answers now, with a string — for the cases that need a CID to hand rather than a node to build from.

file(path: string): Promise<string>

On this page