You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We don't do any character stripping in cloudpathlib (if you find it, it is likely a bug). This is because in most of the backends you can have both a file called s3://bucket/a and a fake virtual directory at s3://bucket/a/.
Because of this we can't safely strip the trailing slash.
What would you expect to be the correct output of parts?
Because the cloud storage services don't actually have / behave as a separator, splitting on / into parts isn't a thing that makes sense. So, unfortunately, I don't think there is an obvious right way to parts to behave. If you have any feedback here on what feels more intuitive, we'd appreciate hearing it.
IMO, the most useful thing would be to ignore the distinction between a/ and a, ie treat prefixes ending in delimiters as folders, for example, like the S3 console does.
It seems to me that a user would be more likely to prefer this behavior than one that maintains this distinction at the cost of absolute(), samefile() etc not working like in Path. Then parts can retain its current behavior (returning "folders").
I would probably introduce a method like sameprefix to capture the current behavior if someone really needed it.
Path:
The text was updated successfully, but these errors were encountered: