class
Bakelite::FS::Registry
- Bakelite::FS::Registry
- Reference
- Object
Overview
Concrete registry implementation managing volumes and union routing
Defined in:
bakelite/dsl/verify_archive_builder.crbakelite/fs.cr
Constructors
Instance Method Summary
- #[](path : String) : Item
- #[]?(path : String) : Item | Nil
-
#content_address : String
Canonical content address URI for this registry's manifest ("sha256:
"). -
#content_manifest : Hash(String, String)
Returns a deterministically sorted map of visible union virtual paths to SHA-256 hex digests.
-
#each_file(&block : Item -> ) : Nil
Iterates over all visible unique items in union priority order.
-
#extract_all(destination_dir : Path | String, overwrite : Bool = true) : Int32
Extracts all visible union files into destination_dir on disk.
-
#extract_folder(prefix : String, destination_dir : Path | String, overwrite : Bool = true) : Int32
Extracts all visible files matching virtual prefix into destination_dir.
-
#extract_volume(name : Symbol | String, destination_dir : Path | String, overwrite : Bool = true) : Int32
Extracts all files from a specific volume into destination_dir on disk.
-
#extract_volume_folder(name : Symbol | String, prefix : String, destination_dir : Path | String, overwrite : Bool = true) : Int32
Extracts a specific subfolder from a specific volume into destination_dir on disk.
-
#files : Array(String)
Returns an array of all virtual paths visible through the union router.
-
#find_all_by_sha256(digest : String) : Array(Item)
Finds all visible items matching a SHA-256 content address (in deterministic virtual path order).
-
#find_by_sha256(digest : String) : Item | Nil
Finds the first visible item (in deterministic virtual path order) matching a SHA-256 content address.
-
#get(path : String) : Item
Queries a path, raising KeyError if not found in any mounted volume.
-
#get?(path : String) : Item | Nil
Queries a path across all mounted volumes using union routing.
-
#get_by_sha256(digest : String) : Item
Fetches a visible item by its SHA-256 content address, raising KeyError if not found.
-
#get_by_sha256?(digest : String) : Item | Nil
Alias for find_by_sha256.
-
#glob(pattern : String, &block : Item -> ) : Nil
Matches all visible files using glob patterns.
- #glob(pattern : String) : Array(Item)
- #has_file?(path : String) : Bool
-
#has_sha256?(digest : String) : Bool
Checks whether a visible item with the given SHA-256 content address exists in this registry.
-
#manifest_sha256 : String
Computes a deterministic SHA-256 manifest digest over all visible union files in this registry.
-
#mount(volume : Volume) : Volume
Mounts a volume into this registry.
-
#mount_file(archive_path : String | Path, volume_name : Symbol | String | Nil = nil, mount : String | Nil = nil, priority : Int32 = 0) : Volume | Nil
Mounts an external .bkl archive file or executable overlay
-
#mount_self!(priority : Int32 = 0) : Bool
Automatically inspects Process.executable_path for appended Bakelite volumes
- #open(path : String) : IO
- #open(path : String, &block : IO -> T) : T forall T
-
#root_volume : Volume
Default root volume for direct bakes without explicit volume declaration.
-
#sha256 : String
Alias for manifest_sha256.
-
#unmount(volume_name : Symbol | String) : Bool
Unmounts a volume by its identifier.
-
#verify_archive(raise_on_error : Bool = false, expected_digests : Hash(String, String) | Nil = nil, expected_manifest_sha256 : String | Nil = nil, strict : Bool = false) : Core::VerificationReport
Verifies the SHA-256 and CRC32 integrity of all visible items in this registry.
- #verify_archive(raise_on_error : Bool = false, &) : Core::VerificationReport
- #verify_archive! : Core::VerificationReport
- #verify_archive!(&) : Core::VerificationReport
-
#volume(name : Symbol | String) : Volume
Retrieves a volume by name.
-
#volume?(name : Symbol | String) : Volume | Nil
Retrieves a volume by name, returning nil if missing.
- #volumes : Array(Volume)
Constructor Detail
Instance Method Detail
Canonical content address URI for this registry's manifest ("sha256:
Returns a deterministically sorted map of visible union virtual paths to SHA-256 hex digests.
Iterates over all visible unique items in union priority order.
Extracts all visible union files into destination_dir on disk.
Extracts all visible files matching virtual prefix into destination_dir.
Extracts all files from a specific volume into destination_dir on disk.
Extracts a specific subfolder from a specific volume into destination_dir on disk.
Finds all visible items matching a SHA-256 content address (in deterministic virtual path order).
Finds the first visible item (in deterministic virtual path order) matching a SHA-256 content address.
Queries a path, raising KeyError if not found in any mounted volume.
Queries a path across all mounted volumes using union routing. Volumes with higher priority shadow lower-priority volumes.
Fetches a visible item by its SHA-256 content address, raising KeyError if not found.
Matches all visible files using glob patterns.
Checks whether a visible item with the given SHA-256 content address exists in this registry.
Computes a deterministic SHA-256 manifest digest over all visible union files in this registry.
Mounts a volume into this registry. Re-sorts volumes by priority descending.
Mounts an external .bkl archive file or executable overlay
Automatically inspects Process.executable_path for appended Bakelite volumes
Default root volume for direct bakes without explicit volume declaration.
Unmounts a volume by its identifier. Cannot unmount root volume.
Verifies the SHA-256 and CRC32 integrity of all visible items in this registry.
Retrieves a volume by name. Raises KeyError if missing.
Retrieves a volume by name, returning nil if missing.