Objective : to iterate and write all the blobs from root and multiple sub-directories present.
this is current code written:
for _file in container_client.walk_blobs(include='metadata'):
file_name = 'file.txt'
f = open(file_name, 'a+')
with open(file_name, 'r') as sample:
read_sample = sample.read()
if not re.search(_file.name, read_sample):
print('New One')
f.write(_file.name + os.linesep)
f.close()
- the above code just returns blob names from root directory.
I was able to extract blobs from specific directory, but not all sub-directories present.
How do I get the blob names present in all sub-directories as well? Thanks for the help !