module
Rubellite::VFS
Overview
In-memory Virtual Filesystem (VFS) for mounting Ruby scripts, packages, and gems directly into CRuby's require and load pipeline with zero disk I/O.
Defined in:
rubellite/vfs.crClass Method Summary
-
.files : Array(String)
Returns a list of all currently mounted virtual paths
-
.hook_ruby! : Nil
Automatically installs the VFS hooks in CRuby Kernel#require and Kernel#load
-
.mount(path : String, code : String) : Nil
Mounts an in-memory Ruby script under the given virtual path
-
.mount_dir(prefix : String, files : Hash(String, String)) : Nil
Mounts a dictionary of files under a directory prefix
-
.mount_file(path : String, code : String) : Nil
Alias for mount
-
.mount_gem(name : String, files : Hash(String, String)) : Nil
Mounts a virtual gem bundle with a standard structure: lib/gem_name.rb and optional sub-files
-
.mounted?(path : String) : Bool
Checks if a virtual path is mounted
-
.normalize_path(path : String) : String
Normalizes a path by replacing backslashes and trimming leading dots or slashes
-
.read(path : String) : String | Nil
Reads the content of a mounted virtual file
-
.reset! : Nil
Clears all mounted virtual files and resets loaded features in Ruby
-
.unmount(path : String) : Bool
Unmounts a virtual file from the VFS
Class Method Detail
Returns a list of all currently mounted virtual paths
Automatically installs the VFS hooks in CRuby Kernel#require and Kernel#load
Mounts an in-memory Ruby script under the given virtual path
Mounts a dictionary of files under a directory prefix
Mounts a virtual gem bundle with a standard structure: lib/gem_name.rb and optional sub-files
Normalizes a path by replacing backslashes and trimming leading dots or slashes
Reads the content of a mounted virtual file
Clears all mounted virtual files and resets loaded features in Ruby