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
CloudPath currently doesn't let you easily check if a bucket itself exists. The exists method only works if you provide some path inside the bucket. This is a nice feature in Pathy and the analogous equivalent of pathlib.Path also works. It would be great to have this included in this library as well.
frompathyimportPathyfromcloudpathlibimportCloudPathfrompathlibimportPath# Doesn't workCloudPath("s3://some-bucket/").exists()
# ParamValidationError: Parameter validation failed:# Invalid length for parameter Key, value: 0, valid min length: 1Pathy("s3://some-bucket/").exists() # True# Since a bucket is the equivalent of a drive, a comparison to pathlib.Path # for checking if a drive exists (I'm using Windows)Path("C:").exists() # True
The text was updated successfully, but these errors were encountered:
Yeah, agreed that this should work. At least on S3, I think the API is different to check for bucket existence, so it probably needs to be special cased. Not sure, but other backends may work.
CloudPath currently doesn't let you easily check if a bucket itself exists. The
exists
method only works if you provide some path inside the bucket. This is a nice feature in Pathy and the analogous equivalent ofpathlib.Path
also works. It would be great to have this included in this library as well.The text was updated successfully, but these errors were encountered: