-
Notifications
You must be signed in to change notification settings - Fork 105
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Path is central to object_store, but manipulating values of this type can be hard because its API is mostly structured around one-way parsing.
Describe the solution you'd like
Expand Paths API. In no particular order:
fn empty()constructor, equivalent toPath::from("/")fn is_empty(&self) -> bool, true ifself.rawis emptyfn len(&self) -> usize, equivalent to.parts().count()fn prefix(&self) -> Self, dual to the existingParts::filename- Bikeshedding:
fn folder?
- Bikeshedding:
- Change
partsto return a custom iterator that is fused and double-ended. - Implement
Expandin addition toFromIterator
Describe alternatives you've considered
One could argue that Path is not designed to be used as a standalone type. But then I would expect it to be internal to object_store, with all APIs using String instead.
Additional context
PR: #546
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request