Reputation: 421
So to view all files in a GCP bucket we have a hook
bucket = 'bucket-name'
hook = GoogleCloudStorageHook(google_cloud_storage_conn_id='ListenerScience',
delegate_to=None)
list_of_files = hook.list(bucket)
But if I wanted to view files inside a folder in the bucket like
'bucket-name/FolderOne/SubFolder'
I get an error saying not a directory. Is there a simple way to view all the files inside folders of bucket.
Upvotes: 3
Views: 1172