Builtin Library
README.md
vfsScanner
Recursive walker for /source/ used by the world validator. Splits
discovered content into a world bucket and a per-library map so the
validator can attribute every problem to the right side of the
library / world boundary.
Exports
M.scanAll() -> { world, libraries }— full sweep.M.scanWorld() -> Bucket— only/source/excluding/source/libs/.M.scanLibraries() -> { [name]: Bucket }— one bucket per library.M.scanLibrary(name) -> Bucket— one named library.M.listLibraryNames() -> { string }— children of/source/libs/.M.assetSuffixes() -> { string }— read-only list of recognised asset folder suffixes (.component,.module, …).
Bucket shape
{
rootPath = "/source", -- root of this bucket
assets = { { path, name, type }, … }, -- asset folder roots
scripts = { { path, name }, … }, -- .luau / .lua files
-- discovered outside
-- any asset folder
}
The walker does NOT recurse into a folder once it recognises it as an
asset root (e.g. Foo.component/, tools/myBox.toolbox/). The asset
validator handles the interior. Loose scripts outside any asset root
(toolbox _shared.luau siblings, stray top-level utilities) are
collected on bucket.scripts.
Notes
- All
vfs.listcalls are wrapped inpcalland treat missing paths as empty — running on a brand-new world with no/source/libs/is safe. - The scanner is read-only.