本文介绍了Amazon S3 Boto-如何删除文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在s3中创建了一个名为"test"的文件夹,并将"test_1.jpg","test_2.jpg"推入"test".
I created a folder in s3 named "test" and I pushed "test_1.jpg", "test_2.jpg" into "test".
如何使用boto删除文件夹"test"?
How can I use boto to delete folder "test"?
推荐答案
S3中没有,也就是说,不附加尾部斜杠,程序还将很高兴地删除your/directory-that-you-wanted-to-remove-is-definitely-not-this-one
.
Notice that the prefix is just searched using dummy string search. If the prefix was , that is, without the trailing slash appended, the program would also happily delete your/directory-that-you-wanted-to-remove-is-definitely-not-this-one
.
有关更多信息,请参见 S3 boto列表键有时会返回目录键
For more information, see S3 boto list keys sometimes returns directory key.
这篇关于Amazon S3 Boto-如何删除文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!