class
Bakelite::FS::Registry
- Bakelite::FS::Registry
- Reference
- Object
Overview
Concrete registry implementation managing volumes and union routing
Defined in:
bakelite/fs.crConstructors
Instance Method Summary
- #[](path : String) : Item
- #[]?(path : String) : Item | Nil
-
#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.
-
#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.
-
#glob(pattern : String, &block : Item -> ) : Nil
Matches all visible files using glob patterns.
- #glob(pattern : String) : Array(Item)
- #has_file?(path : String) : Bool
-
#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.
-
#unmount(volume_name : Symbol | String) : Bool
Unmounts a volume by its identifier.
-
#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
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.
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.
Matches all visible files using glob patterns.
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.
Retrieves a volume by name. Raises KeyError if missing.
Retrieves a volume by name, returning nil if missing.