- fixed a bug in *sort.ts* where passed number arrays wouldnt get properly parsed into TreeNode arrays
- excluded inode 0 from tree traversal results
This commit is contained in:
@@ -15,6 +15,8 @@ import type { TreeNode } from "@core/filesystem/treenode";
|
||||
import { getCurrentSession, type GroupInfo, type UserInfo } from "@core/session_manager";
|
||||
import { createInitialShellState, type ShellState } from "@core/shell_state";
|
||||
import { resolveInode } from "@core/util/path_resolver";
|
||||
import { sortTreeNodes } from "@core/util/sort";
|
||||
import { dnTraverseTree } from "@core/util/tree_traversal";
|
||||
import { deserializeFileSystem } from "@shell/serializer";
|
||||
import { Shell } from "@shell/shell";
|
||||
import { printTree } from "./util/tree_visualizer";
|
||||
@@ -51,6 +53,8 @@ await Shell.init(state);
|
||||
console.log(resolveInode(Shell.Instance?.State!, 6));
|
||||
console.log(resolveInode(Shell.Instance?.State!, 6, true));
|
||||
|
||||
console.log(sortTreeNodes(Shell.Instance?.State!, dnTraverseTree(Shell.Instance?.State.filesystem!, 0)));
|
||||
|
||||
Shell.Instance?.on("result", payload => {
|
||||
const decoded = new TextDecoder().decode(payload.result.stdout.toArray());
|
||||
process.stdout.write(decoded + "\n");
|
||||
|
||||
Reference in New Issue
Block a user