whatwg/fs

Support getDirectory() for non-default bucket

a-sully opened this issue · 3 comments

See https://wicg.github.io/storage-buckets/#issue-25ffaa8c

The issue mentioned in the storage buckets spec is that we need a version of this algorithm which works for any bucket. You'll notice if you drill down into "obtain a local storage bottle map" that it currently assumes the "default" bucket. This just means passing an additional parameter.

We do not currently have a way to go from bottle to bucket for any storage endpoint.

Originally posted by @evanstade in #110 (comment)

whatwg/storage#2 is the meta-bug for making non-default buckets work, and it seems like addressing that is a prerequisite for adding another parameter to "obtain a local storage bottle map" to make it work for non-default buckets

Adding another parameter to "obtain a local storage bottle map" is (part of) what addresses that metabug, no?

Correct. Apologies, that was poor wording on my part. My understanding of the steps are:

  • Decide how to make non-default buckets work whatwg/storage#2
  • Specify how non-default buckets will work:
    • Add another parameter to "obtain a local storage bottle map" to make it work for non-default buckets
    • etc...
  • Update this spec (and other storage specs) to take into account non-default buckets:
    • Use the new "obtain a local storage bottle map" algorithm in getDirectory()
    • etc...