Drive Folders: Overview of Methods
Folders in Bitrix24 Drive allow you to create a logical structure for storing files, such as by document types, dates, or clients. This makes it easier to search for and access the necessary information.
Quick navigation: all methods
Folder Structure
Folders in Drive are organized hierarchically. Each folder can contain nested folders and files. You can retrieve the list of files and subfolders using the disk.folder.getchildren method.
A new folder can be created using the disk.folder.addsubfolder method, and a file can be uploaded using the disk.folder.uploadfile method.
Parent and child folders are linked through the PARENT_ID parameter. You can obtain it using the disk.folder.get method. In addition to PARENT_ID, the method will return all folder parameters by the id identifier.
Folder Operations
You can perform the following operations with Drive folders:
- assign access permissions using the disk.folder.sharetouser method
- move within the structure using the disk.folder.moveto method
- copy to other Drive folders using the disk.folder.copyto method
- rename using the disk.folder.rename method
External User Access
To provide access to an external user for a folder, you need to create a public link. This will allow you to share the folder's contents with people who do not have access to Bitrix24. You can obtain a public link for the folder using the disk.folder.getexternallink method.
How to Delete Folders
Folders can be moved to the trash using the disk.folder.markdeleted method. Deleted folders can be restored using the disk.folder.restore method within 30 days.
To permanently delete a folder without the possibility of recovery, you need to use the disk.folder.deletetree method. This will destroy the folder along with all nested folders and files forever.
User Documentation
Overview of Methods
Scope:
diskWho can perform the method: any user
|
Method |
Description |
|
Returns the description of folder fields |
|
|
Returns the folder by identifier |
|
|
Returns a list of files and folders located in the folder |
|
|
Creates a subfolder |
|
|
Assigns access permissions to the folder |
|
|
Copies the folder to the specified folder |
|
|
Moves the folder to the specified folder |
|
|
Renames the folder |
|
|
Permanently deletes the folder and all its contents |
|
|
Moves the folder to the trash |
|
|
Restores the folder from the trash |
|
|
Uploads a new file to the specified folder |
|
|
Returns a public link to the folder |