ISharePointFileServiceUpdateFile Method |
Updates file identified by serverRelativeUrl. New content and file name can be provided.
Namespace: CMS.SharePointAssembly: CMS.SharePoint (in CMS.SharePoint.dll) Version: 13.0.131
Syntax void UpdateFile(
string serverRelativeUrl,
Stream stream,
string newServerRelativeUrl
)
Parameters
- serverRelativeUrl
- Type: SystemString
Server relative URL of the file being updated. - stream
- Type: System.IOStream
Stream providing file's binary content. - newServerRelativeUrl
- Type: SystemString
New server relative URL of the file.
Exceptions Exception | Condition |
---|
SharePointFileAlreadyExistsException | Thrown when newServerRelativeUrl identifies existing file. |
FileNotFoundException | Thrown when file identified by serverRelativeUrl does not exist on SharePoint server. |
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