Closed pyramation closed 5 years ago
It seems possible, but why would you want to do that? Instead, you can use FolderAdapter
to split up a single local storage into multiple file systems scoped to certain folders.
Closing since I believe FolderAdapter
solves this use case. Feel free to reopen if you disagree!
Wondering if it's possible to add a prefix to the keys when using any localstorage (or locally persistent) storage.
To give some context, I'm looking to have the ability to have multiple
fs
instances for use cases of checking out other files systems, each having their own sandboxed root'/'
folder.Currently, I can get it to work using
InMemory
:However, if I use
LocalStorage
, it ends up "using the same filesystem".Here's a psuedo-code test to give a gist of what I'm trying to accomplish:
I was thinking it could already be a potential option, and if not, I was curious if it is an option that could be added, e.g.,
LocalStorage.create({ prefix: 'mystorage' }, (e, lsfs) => { ... })