ruby - How do you rename a folder in a bucket on S3? -


It seems as easy as it sounds like an extraordinary complex task.

If you are using the A VS-S3 gem, the following code BUCKET_NAME Bucket NEW_FOLDER_NAME OLD_FOLDER_NAME will rename the folder in:

  Bsize = OLD_FOLDER_NAME.size bucket = AWS :: S3 :: bucket.find (BQFAA) bucket.bags ({: prefix = & gt; OLD_FOLDER_NAME }). Do each AWS :: S3 :: S3Object.rename (o.key, NEW_FOLDER_NAME + o.key [bsize ..-1], BUCKET_NAME) and  

This is the same. Folders are not real objects, so all you have to do is rename all the objects that end in that particular path in the new path. The virtual folder will be changed as a result.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -