When using an http-based store or s3store with a prefix that points directly to an object/file, calling get("")
will retrieve the object, i.e.
store = obstore.store.from_url("s3://my-bucket/bar.txt")
store.get("") # <-- returns bar.txt object
however for file-based paths the following does not work
store = obstore.store.from_url("file:///home/foo/bar.txt")
store.get("") # <-- throws error!
this throws the error
Generic LocalFileSystem error: Filenames containing trailing '/#\d+/' are not supported:
Debug source:
Generic {
store: "LocalFileSystem",
source: InvalidPath {
path: "",
},
}
Ideally LocalStore would also support "". This makes tooling for downloading a file://, s3://, gs:// url easy.
Alternatively this issue could be worked around if there were a way of constructing a store from a url, but unprefixed and returning the prefix separately, i.e. something like
store, prefix = obstore.store.unprefixed_from_url("file://foo/bar.txt")
store.get(prefix) # <-- works for file:// now!
When using an http-based store or s3store with a prefix that points directly to an object/file, calling get("")
will retrieve the object, i.e.
however for file-based paths the following does not work
this throws the error
Ideally LocalStore would also support "". This makes tooling for downloading a file://, s3://, gs:// url easy.
Alternatively this issue could be worked around if there were a way of constructing a store from a url, but unprefixed and returning the prefix separately, i.e. something like