フォルダの削除
フォルダの削除
Box上でフォルダを削除するには、削除するフォルダのIDをAPIに渡す必要があります。
cURL
curl -i -X DELETE "https://api.box.com/2.0/folders/4353455" \
-H "authorization: Bearer <ACCESS_TOKEN>"
TypeScript Gen
await parentClient.folders.deleteFolderById(folder.id);
Python Gen
parent_client.folders.delete_folder_by_id(folder.id)
.NET Gen
await parentClient.Folders.DeleteFolderByIdAsync(folderId: folder.Id);
Java
// Delete the folder and all its contents
BoxFolder folder = new BoxFolder(api, "id");
folder.delete(true);
Python
client.folder(folder_id='22222').delete()
.NET
await client.FoldersManager.DeleteAsync("11111", recursive: true);
Node
client.folders.delete('12345', {recursive: true})
.then(() => {
// deletion succeeded — no value returned
});
iOS
client.folders.delete(folderId: "22222", recursive: true) { result: Result<Void, BoxSDKError>} in
guard case .success = result else {
print("Error deleting folder")
return
}
print("Folder and contents successfully deleted")
}