feat: migrate definitiosn

This commit is contained in:
TrèsAbhi committed 2025-11-26 13:07:53 -06:00
1 parent 1cc15f64b0
commit 3efe807e35
2 files changed
+67 -55

No files matched your search

+18
View File
@@ -96,6 +96,24 @@ export class SteamVFS {
return path;
}
dir(path: string) {
const parentSegments = path.split("/").length;
const children: string[] = [];
for (const child of this.manifest.keys()) {
const childSegments = child.split("/");
if (
child.startsWith(path) &&
parentSegments + 1 === childSegments.length
) {
children.push(childSegments.at(-1)!);
}
}
return children;
}
async file(requested: string) {
const path = this.assert(requested);
const fileManifest = this.manifest.get(path)!;