I am trying to download all files of a directory from digital ocean space that works like amazon s3. I have written the code below for the purpose: