pizzarr icon indicating copy to clipboard operation
pizzarr copied to clipboard

store$contains_item for sub_paths?

Open keller-mark opened this issue 1 year ago • 1 comments

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 avatar May 07 '24 19:05 keller-mark

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)

keller-mark avatar Jun 18 '24 16:06 keller-mark