Click or drag to resize
ISharePointFileServiceUpdateFile Method
Updates file identified by serverRelativeUrl. New content and file name can be provided.

Namespace: CMS.SharePoint
Assembly: CMS.SharePoint (in CMS.SharePoint.dll) Version: 9.0.0
Syntax
C#
void UpdateFile(
	string serverRelativeUrl,
	Stream stream,
	string newServerRelativeUrl
)

Parameters

serverRelativeUrl
Type: SystemString
Server relative URL of the file being updated.
stream
Type: CMS.IOStream
Stream providing file's binary content.
newServerRelativeUrl
Type: SystemString
New server relative URL of the file.
Exceptions
ExceptionCondition
SharePointFileAlreadyExistsExceptionThrown when newServerRelativeUrl identifies existing file.
FileNotFoundExceptionThrown when file identified by serverRelativeUrl does not exist on SharePoint server.
WebExceptionThrown when error related to network or protocol occurs.
SharePointConnectionNotSupportedExceptionThrown when given connectionData contains unsupported authentication mode or invalid URL.
ExceptionThrown in case of unexpected error condition.
See Also