upTraverseTree algo implementation start, doesnt work currently. basic test of the function written

This commit is contained in:
2026-07-20 15:21:50 +02:00
parent c7dc8f6c37
commit e89cec47d9
5 changed files with 110 additions and 9 deletions
+6 -2
View File
@@ -1,5 +1,5 @@
import { createImmutableBuffer, type ImmutableBuffer } from "@core/util/immutable_buffer";
import { traverseTree } from "@core/util/tree_traversal";
import { dnTraverseTree } from "@core/util/tree_traversal";
import type { AlreadyExistsError, IllegalMutationError, NodeNotFoundError, NotADirectoryError } from "./errors";
import { TreeNodeType, type DirectoryNode, type FileNode, type TreeNode } from "./treenode";
@@ -88,6 +88,10 @@ export class FileSystem {
return node.type === TreeNodeType.Symlink ? true : false;
} */
/* public moveNode(sourceInode: number, destinationInode: number, name?: string): FileSystem {
} */
public modifyNode(
inode: number,
changes: {
@@ -272,7 +276,7 @@ export class FileSystem {
}
const time: number = Date.now();
const descendants: number[] = traverseTree(this, inode);
const descendants: number[] = dnTraverseTree(this, inode);
const map: Map<number, TreeNode | null> = new Map(this._OverlayFS);
for (const entry of descendants) {