SysDeleteFolder
Delete the specified folder (and optionally child files and subfolders). Return the updated directory tree.
Service | Operation |
---|---|
globalFileV3 | SYS_DELETE_FOLDER |
Method Parameters
Parameter | Description |
---|---|
treeId | Tree location of the folder to delete |
folderPath | Path of that tree location (as an intention check) |
treeVersion | Current tree version |
recurse | Delete files and subfolders if not empty? |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
var globalFileProxy = bridge.getGlobalFileV3ServiceProxy();
var treeId = "";
var folderPath = "/";
var treeVersion = 2;
var recurse = false;
var postResult = globalFileProxy.sysDeleteFolder(
treeId, folderPath, treeVersion, recurse );
if (postResult.status == 200) {
// Success!
}
{
"service": "globalFileV3",
"operation": "SYS_DELETE_FOLDER",
"data": {
"treeId": "",
"cloudPath": "/",
"treeVersion": 2,
"recurse": false
}
}
JSON Response
{
"status": 200,
"data": {
"globalTree": {
"tree": [
{
"treeId": "2188e9cf-27fa-4a33-8d06-3306f9a74bf8",
"children": null,
"name": "art",
"type": "Folder",
"desc": "Folder for art assets"
},
{
"treeId": "146cce63-da7a-40c7-bd57-5b5f81607523",
"children": null,
"name": "audio",
"type": "Folder",
"desc": "For audio files"
}
],
"treeVersion": 3
}
}
}