SPFile.Delete method
Deletes the file object.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Sub Delete
'Usage
Dim instance As SPFile
instance.Delete()
public void Delete()
Exceptions
Exception | Condition |
---|---|
SPException | An error occurred while deleting the file. |
Remarks
If the file does not exist, the Delete method silently fails and does not throw an exception.