dev(puterfs): move read to extension

This commit is contained in:
KernelDeimos
2025-11-05 16:13:07 -05:00
committed by Eric Dubé
parent 0fd7100795
commit f2ad7ddfb5
2 changed files with 22 additions and 15 deletions

View File

@@ -885,21 +885,8 @@ class PuterFSProvider extends putility.AdvancedBase {
version_id,
range,
}) {
// TODO: one PuterFS 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 location = await node.get('s3:location') ?? {};
const stream = (await storage.create_read_stream(await node.get('uid'), {
// TODO: fs:decouple-s3
bucket: location.bucket,
bucket_region: location.bucket_region,
version_id,
key: location.key,
memory_file: node.entry,
...(range ? { range } : {}),
}));
return stream;
console.error('This .read should not be called!');
process.exit(1);
}
}