- Fixed cat command

- Moved device config initialization to `serializer.ts`
- Minor bugfixes
- Added `read()` to `filesystem.ts`
This commit is contained in:
2026-11-13 04:15:28 +01:00
parent d5566aa494
commit de1ce64226
5 changed files with 61 additions and 43 deletions
+9
View File
@@ -121,6 +121,15 @@ export class FileSystem {
return this.resolveNode(ptr) !== undefined;
}
public async read(ptr: NodePointer): Promise<Uint8Array> {
const dev = this._VDiskManager.getDisk(ptr.device);
if (!dev) return new Uint8Array();
const node = dev.getNode(ptr.inode);
if (!node) return new Uint8Array();
return dev.readContent((node as FileNode).content);
}
public mount(mount: NodePointer, target: NodePointer) {
if (!this._VDiskManager.hasDisk(mount.device)) {
throw {