- Cleaned up old tests
- Changed `node:buffer` and `node:streams` imports to native `WebWorkers` imports; - Fixed tests that used old `toPtr` and `fromPtr` functions to use the new NodePointer class methods - Exposed pointer resolution helper functions to the consumer
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import type { UserInfo } from "@core/session_manager";
|
||||
import { upTraverseTree } from "@core/util/tree_traversal";
|
||||
import { VDiskManager } from "@core/util/vdisk_manager";
|
||||
import type { Blob } from "node:buffer";
|
||||
import type { Readable } from "node:stream";
|
||||
import type {
|
||||
AlreadyExistsError,
|
||||
DeviceNotFoundError,
|
||||
@@ -379,7 +377,7 @@ export class FileSystem {
|
||||
mode: number;
|
||||
owner: number;
|
||||
group: number;
|
||||
content: Blob | Readable;
|
||||
content: Blob | ReadableStream;
|
||||
size: number;
|
||||
}
|
||||
| { type: NodeType.Directory; mode: number; owner: number; group: number }
|
||||
@@ -507,7 +505,7 @@ export class FileSystem {
|
||||
await dev.writeContent((node as FileNode).content, content);
|
||||
}
|
||||
|
||||
public streamContent(target: NodePointer): Readable {
|
||||
public streamContent(target: NodePointer): ReadableStream {
|
||||
const dev = this._VDiskManager.getDisk(target.device);
|
||||
const node = this.resolveNode(target);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user