mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 02:37:05 +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 { 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));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user