[GH-ISSUE #215] Checking if a folder exists is not working as expected #2192

Closed
opened 2026-03-15 17:57:59 +03:00 by kerem · 1 comment
Owner

Originally created by @reaVen- on GitHub (Apr 16, 2020).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/215

when connecting to googles endpoint by using
blob = storage.Blob(bucket=bucket, name="somefolder/")
fileExists = blob.exists() # true

however when overiding storage endpoints etc as explained in examples for python. and using the exact same code, fileExists is now false. It works as expected when checking for example 'name="somefolder/somefile.txt"'

Originally created by @reaVen- on GitHub (Apr 16, 2020). Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/215 when connecting to googles endpoint by using blob = storage.Blob(bucket=bucket, name="somefolder/") fileExists = blob.exists() # true however when overiding storage endpoints etc as explained in examples for python. and using the exact same code, fileExists is now false. It works as expected when checking for example 'name="somefolder/somefile.txt"'
kerem 2026-03-15 17:57:59 +03:00
Author
Owner

@fsouza commented on GitHub (Apr 20, 2020):

yeah I think it's a known limitation of the fs backend that "directory" objects aren't supported, unfortunately :( We could use some special folder at the root for metadata and storing this kind of info, but right now it isn't supported :(

<!-- gh-comment-id:616803740 --> @fsouza commented on GitHub (Apr 20, 2020): yeah I think it's a known limitation of the fs backend that "directory" objects aren't supported, unfortunately :( We could use some special folder at the root for metadata and storing this kind of info, but right now it isn't supported :(
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#2192
No description provided.