feat: sort

This commit is contained in:
TrèsAbhi committed 2025-11-25 22:21:58 -06:00
1 parent f4e7b2ed98
commit 00795eecdd
1 file changed
+4 -5
+4 -5
View File
@@ -1,5 +1,4 @@
import { writeFile } from "fs/promises";
import { normalize } from "path";
import SteamUser, { EConnectionProtocol } from "steam-user";
interface SteamManifestFile {
@@ -65,14 +64,14 @@ export class SteamVFS {
);
});
let str = "";
const paths: string[] = [];
for (const file of manifest.files) {
const path = normalize(file.filename);
str += `${path}\n`;
const path = file.filename.replaceAll("\\", "/");
paths.push(path);
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));
}