Manage folders (prefixes)
S3 has a flat structure in which technically the folder entity does not exist, but simulated folders can be created and viewed in the control panel and GUI utilities for ease of use with the storage.
The folder name is a prefix in the object name.If an object is in multiple subfolders, all folders make up the prefix.The prefix is included in the object name when working with the repository through console utilities and APIs.When a folder is renamed, every object in it is actually renamed.
For example, a folder Folder1
has been created in baket, in which there is a folder Folder2
. Object.txt
object is located in Folder2
folder . The full name of the object is Folder1/Folder2/Object.txt
, it should be specified when accessing via API and console clients. The object name Folder1/Folder2/
is a prefix.
All objects in the folder inherit the properties of the bucket.
You can copy, move and delete a folder.
Create a folder
- In the control panel, on the top menu, click Products and select S3.
- Go to the Buckets section.
- Open the baket page → Objects tab.
- Click Create Folder
- Enter the name of the folder.
- Click Create.
Move the folder
- In the control panel, on the top menu, click Products and select S3.
- Go to the Buckets section.
- Open the baket page → Objects tab.
- From the menu of the folder, select Move.
- Open the folder to which you want to move the folder.
- Click Paste to current folder.
Copy folder
- In the control panel, on the top menu, click Products and select S3.
- Go to the Buckets section.
- Open the baket page → Objects tab.
- From the menu of the folder, select Copy.
- Open the folder to which you want to copy the folder.
- Click Paste to current folder.
Delete folder
If versioning is enabled in the package, when deleting a folder (deleting objects with a certain prefix), the objects will have versions created, for more information, see the Delete an object when versioning is enabled or suspended subsection of the Delete an object instruction.When deleting a folder, objects are deleted without specifying a version.
- In the control panel, on the top menu, click Products and select S3.
- Go to the Buckets section.
- Open the baket page → Objects tab.
- From the folder's menu, select Delete Folder.
- Enter a name for the folder and click Delete.