mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: migrate definitiosn
This commit is contained in:
1 parent
1cc15f64b0
commit
3efe807e35
2 files changed
+67
-55
No files matched your search
@@ -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)!;
|
||||
|
||||
Reference in new issue
Block a user