keller-mark / pizzarr

Slice into Zarr arrays in R 🍕
https://keller-mark.github.io/pizzarr/
Other
29 stars 3 forks source link

store$contains_item for sub_paths? #72

Open keller-mark opened 6 months ago

keller-mark commented 6 months ago

User story

Currently, contains_item returns false for parts of keys. For example if there is something at /foo/bar/.zattrs it will only return true for the full path and not necessarily /foo only

Preferred solution

Possible alternatives

keller-mark commented 5 months ago

Behavior should be the same between all stores (e.g., MemoryStore and DirectoryStore) - currently I think it is not as file.exists will return TRUE for a directory.

Also, behavior should be consistent with Python. If needed, we can add an argument like $contains_item(include_ancestors = FALSE)