mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-01 12:39:22 -05:00
91f948f1fc
Begin work on LocalDiskStorageController in the `puterfs` extension. This replaces LocalDiskStorageStrategy and LocalDiskStorageService from the core. The `upload()` method is implemented to verify that it's working. This commit by itself will break other storage strategies. The next step is to allow extensions to register storage controllers for puterfs. Part of that work is done in this commit by emitting an event to register storage controllers, but this commit does not include a way to configure/select storage controllers.
25 lines
505 B
JavaScript
25 lines
505 B
JavaScript
export default class {
|
|
constructor (delegate) {
|
|
this.delegate = delegate ?? null;
|
|
}
|
|
setDelegate (delegate) {
|
|
this.delegate = delegate;
|
|
}
|
|
|
|
init (...a) {
|
|
return this.delegate.init(...a);
|
|
}
|
|
upload (...a) {
|
|
return this.delegate.upload(...a);
|
|
}
|
|
copy (...a) {
|
|
return this.delegate.copy(...a);
|
|
}
|
|
delete (...a) {
|
|
return this.delegate.delete(...a);
|
|
}
|
|
read (...a) {
|
|
return this.delegate.read(...a);
|
|
}
|
|
}
|