sync: implement read in MemoryFS
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
test / backend (node env, api-test) (22.x) (push) Has been cancelled
test / puterjs (browser env, playwright) (22.x) (push) Has been cancelled
test / puterjs (node env, vitest) (22.x) (push) Has been cancelled

This commit is contained in:
KernelDeimos
2025-11-04 13:58:46 -05:00
committed by Eric Dubé
parent 875ecc051b
commit 19314d6496
@@ -596,6 +596,20 @@ class MemoryFSProvider {
return node;
}
async read({
context,
node,
}) {
// TODO: once MemoryFS aggregates its own storage, don't get it
// via mountpoint service.
const svc_mountpoint = context.get('services').get('mountpoint');
const storage = svc_mountpoint.get_storage(this.constructor.name);
const stream = (await storage.create_read_stream(await node.get('uid'), {
memory_file: node.entry,
}));
return stream;
}
}
module.exports = {