Hi guys,
I've been going through the docs and the documentation I find always gets the directory first and then get the file to be destroyed.
I got a simple script running and it works like a champ!
The script is like this:
require 'fog'
conn = Fog::Storage.new(
provider: 'Rackspace',
rackspace_username: 'username',
rackspace_api_key: 'key'
)
directory = conn.directories.get('mycontainer')
f = directory.files.head("path/file1.jpg")
puts "Should return file: #{f.inspect}"
My big problem is that I know the path of the file "path/file1.jpg" (which is the key attribute to the file) but not the container name, and I have about 20 different containers.
Is there a method that works like a search file that receives the file key?!
I don't know why the container is not saved along with 'path/file1.jpg' but I'm already thinking on adding it, I just want to know if I will have to do that before or after cleaning my containers.
Anyway, if there is no search I'll have to brute force and iterate through all containers all files to delete the old files...
Thanks in advance,
./Helio