| ISharePointFileServiceRecycleFile Method |
Moves the file specified by serverRelativeUrl to the recycle bin of the SharePoint server.
Returns the identifier of the new recycle bin item.
Recycling a non-existent file within SharePoint site returns empty GUID.
Throws exception when serverRelativeUrl is invalid (does not point within any SharePoint site).
Namespace: CMS.SharePointAssembly: CMS.SharePoint (in CMS.SharePoint.dll) Version: 13.0.131
SyntaxGuid RecycleFile(
string serverRelativeUrl
)
Parameters
- serverRelativeUrl
- Type: SystemString
Server relative URL of the file.
Return Value
Type:
GuidGUID of the new recycle bin item, or
Empty when file does not exist.
Exceptions| Exception | Condition |
|---|
| ArgumentException | Thrown when serverRelativeUrl does not point within any SharePoint library. |
| ArgumentNullException | Thrown when serverRelativeUrl is null. |
| SharePointServerException | Thrown whenever server error occurs. |
| WebException | Thrown when error related to network or protocol occurs. |
| SharePointConnectionNotSupportedException | Thrown when given connectionData contains unsupported authentication mode or invalid URL. |
| Exception | Thrown in case of unexpected error condition. |
See Also