| SharePointFileInfoProviderUpdateFile Method | 
            Updates file in SharePoint library with new content and name.
            The newFileName can be the same as the old one.
            The updated file is immediately available both on the SharePoint server and locally in the library.
            
 
Namespace: CMS.SharePointAssembly: CMS.SharePoint (in CMS.SharePoint.dll) Version: 13.0.131
 Syntax
Syntaxpublic static void UpdateFile(
	SharePointFileInfo fileInfo,
	Stream contentStream,
	string newFileName
)
Parameters
- fileInfo
- Type: CMS.SharePointSharePointFileInfo
 SharePoint file to be updated.
- contentStream
- Type: System.IOStream
 Stream containing the new file's binary content.
- newFileName
- Type: SystemString
 File name of the updated file.
 Exceptions
Exceptions| Exception | Condition | 
|---|
| SharePointFileAlreadyExistsException | Thrown when newFileName identifies an already existing file within the library. | 
| FileNotFoundException | Thrown when file identified by fileInfo does not exist on SharePoint server. | 
| SharePointConnectionNotFoundException | Thrown when the SharePoint library has no valid connection defined. | 
| Exception | Thrown in case of unexpected error condition. | 
 See Also
See Also