About Trash

About Trash

Contents

Introduction

Trash can APIs allow you to retrieve, restore, or permanently delete files and folders that are in deleted state.

Examples

emptyTrash

Use this code sample to permanently remove files and folders that are marked as deleted.

Code Sample

cloud.emptyTrash({
			virtualfolder: "VZMOBILE",
			success: function(resp) {
				
			},
	});	
```	


### getTrash

This code sample results in the listing of all files or folders that are marked as deleted.

**Code Sample**

```javascript
cloud.getTrash({
			virtualfolder: "VZMOBILE",
			success: function(resp) {
				var files = resp.body.trashCan.file;
				var folders = resp.body.trashCan.folder
			}
	});

restore

Use this code sample to restore files or folders from trash.

Code Sample

var fileToRestore = "/path/to/file.jpg";
	
	cloud.restore({
			path: fileToRestore,
			success: function(resp) {
			
			},
	});

Copyright © 2015-2017, Verizon and/or its Licensors. All rights reserved.