mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
feat: sort
This commit is contained in:
1 parent
f4e7b2ed98
commit
00795eecdd
1 file changed
+4
-5
@@ -1,5 +1,4 @@
|
|||||||
import { writeFile } from "fs/promises";
|
import { writeFile } from "fs/promises";
|
||||||
import { normalize } from "path";
|
|
||||||
import SteamUser, { EConnectionProtocol } from "steam-user";
|
import SteamUser, { EConnectionProtocol } from "steam-user";
|
||||||
|
|
||||||
interface SteamManifestFile {
|
interface SteamManifestFile {
|
||||||
@@ -65,14 +64,14 @@ export class SteamVFS {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
let str = "";
|
const paths: string[] = [];
|
||||||
for (const file of manifest.files) {
|
for (const file of manifest.files) {
|
||||||
const path = normalize(file.filename);
|
const path = file.filename.replaceAll("\\", "/");
|
||||||
str += `${path}\n`;
|
paths.push(path);
|
||||||
this.manifest.set(path, file);
|
this.manifest.set(path, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
writeFile("test.txt", str);
|
writeFile("test.txt", paths.sort().join("\n"));
|
||||||
|
|
||||||
console.log(JSON.stringify(manifest.files[0], null, 2));
|
console.log(JSON.stringify(manifest.files[0], null, 2));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user