ftos.files.recycle
IMPORTANT!
Starting with v24.3.0, this is renamed from recycleFile to ftos.files.recycle.
Starting with v24.3.0, this is renamed from recycleFile to ftos.files.recycle.
Moves a file to the $RecycleBin subfolder of the file upload location.
This is a business logic method for business service components.
Syntax
Copy
function ftos.files.recycle(fileRealName: string): void
| Parameter | Description |
|---|---|
fileRealName
|
Unique internal ID (real name) of the orphan file. |
Examples
In this example:
- We store information about all the orphan files in a variable called orphans. For details, see ftos.files.getDeleted.
- We move all orphan files to the Recycle Bin based on their RealName.
Copy
orphans = ftos.files.getDeleted(null, null, null);
orphans.forEach(function(item, index, array){
ftos.files.recycle(item.RealName);
});