FileManager class
Manages source file loading and virtual file system for the VM.
Provides functionality to load source files from both the physical file system and a virtual in-memory file system. Supports configurable search paths and module resolution for the import system.
Constructors
- FileManager({LuaRuntime? interpreter})
- Creates a new FileManager instance.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
resolvedGlobs
→ List<
Map< String, String> > -
Get the list of resolved globs for debugging
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
searchPaths
→ List<
String> -
Returns the current list of module search paths.
no setter
Methods
-
addSearchPath(
String searchPath) → void - Adds a directory to the module search path.
-
clearResolvedGlobs(
) → void - Clears the list of resolved globs
-
clearVirtualFiles(
) → void - Clears all registered virtual files.
-
loadSource(
String filePath, {bool preserveRawBytes = false}) → Future< String?> - Loads source code from a file or virtual file.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
printResolvedGlobs(
) → void - Prints all the resolved globs for debugging
-
registerVirtualFile(
String virtualPath, String content) → void - Registers a virtual file that will be available to load().
-
resolveAbsoluteModulePath(
String modulePath) → String - Resolves a module path to an absolute path.
-
resolveModulePath(
String moduleName) → Future< String?> - Gets the full path for a module name.
-
setInterpreter(
LuaRuntime interpreter) → void - Sets the interpreter reference.
-
setSearchPaths(
List< String> paths) → void - Sets the module search paths.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited