hyperdrive
hyperdrive copied to clipboard
Pass though opts parameter to metadata hypertrie
It would be useful to have the ability to pass through the opts parameter of createWriteStream, createReadstream etc. to the metadata db/hypertrie.
This e.g. would make it possible to create hidden files by simple passing the hidden: true option.
However, according to @mafintosh this would result in internal clashes, therefore some namespacing is required (obviously, e.g. for the valueEncoding option).
So here's my suggestion for the options namespace:
{
db: { /* opts passed to the db */ }
}
I'll try to implement it right away and create a pull request once it works ;-)
Discussion on Discord
Possible limitations - the question here is if there would even be a usecase for it:
- usages of
_update=> used bysetMetadata/removeMetadata, which don't have the opts parameter at all - usages of
_upsert(what does that even do?) symlinkdoes not have the opts parameter