Returns true if a VFS bundle is currently loaded.
@eryx/vfs Module
JSON
Summary
Functions
API Reference
Functions
vfs.isOpen
vfs.entrypoint
Returns the entrypoint path of the loaded bundle, or nil if no bundle is open.
vfs.readFile
Reads the entire contents of a VFS file as a string. Errors if no bundle is open or the file doesn't exist.
vfs.exists
Returns true if the given path exists in the VFS bundle.
Returns false if no bundle is open.
vfs.listDir
Returns an array of direct children (files and directories) in the given VFS directory. Returns an empty table if no bundle is open.
vfs.isFile
Returns true if the given path is a file in the VFS bundle.
Returns false if no bundle is open or the path is a directory / doesn't exist.
vfs.isDir
Returns true if the given path is a directory in the VFS bundle.
A path is a directory if any file exists under it.
Returns false if no bundle is open.
vfs.mtime
Returns the modification time of a VFS file (as stored at bundle time). Errors if no bundle is open or the file doesn't exist.
vfs.build
Builds a new VFS bundle by cloning an executable and appending a file archive.
vfs.isIsolated
Returns true if VFS isolation is enabled (the default).
When isolated, VFS scripts cannot fall through to the real filesystem
for requires or config resolution.
vfs.setIsolated
Sets VFS isolation mode. When disabled, VFS scripts can fall through to the real filesystem (relative to the exe directory) for requires and config resolution.
Types
BuildOptions
Path to the output executable.
Project root directory. All file paths in the bundle are relative to this.
Entrypoint script path (relative to root).
Array of file or directory paths to include in the bundle. Directories are expanded recursively.
Source executable to clone. Defaults to the currently running executable.