ISharePointFileService GetFile Method Kentico 8.1 API Reference
Gets SharePoint file identified by server relative URL. The file may be loaded eagerly or lazily (depends on implementation). In such case an invalid serverRelativeUrl is not reported immediately.

Namespace: CMS.SharePoint
Assembly: CMS.SharePoint (in CMS.SharePoint.dll) Version: 8.0.0.0 (8.1.5347.20411)

Return Value

Type: ISharePointFile
SharePoint file, or null
Exceptions

ExceptionCondition
OnlineSystem.IO FileNotFoundExceptionThrown when requested file is not present at SharePoint server (and eager loading is used).
CMS.SharePoint SharePointServerExceptionThrown whenever server error occurs.
OnlineSystem.Net WebExceptionThrown when error related to network or protocol occurs.
CMS.SharePoint SharePointConnectionNotSupportedExceptionThrown when given connectionData contains unsupported authentication mode or invalid URL.
CMS.SharePoint SharePointCCSDKExceptionThrown when identity client library "msoidcliL.dll" needed for SharePoint Online authentication is missing. See documentation for details.
OnlineSystem ExceptionThrown in case of unexpected error condition.
See Also