| ISharePointFileServiceDeleteFile Method | 
            Deletes the file specified by serverRelativeUrl from the SharePoint server.
            Deleting a non-existent file within SharePoint site is a void action.
            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
 Syntax
Syntaxvoid DeleteFile(
	string serverRelativeUrl
)
Parameters
- serverRelativeUrl
- Type: SystemString
 Server relative URL of the file.
 Exceptions
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
See Also