I have a script where I want to check if a file exists in a bucket and if it doesn't then create one.
I tried using
file_path = "/gs/testbucket"
I guess there is no function to check directly if the file exists given its path.
I have created a function that uses the
files.listdir() API function to list all the files in the bucket and match it against the file name that we want. It returns true if found and false if not.