Method | Description | |
---|---|---|
ApproveFile ( this web, string serverRelativeUrl, string comment ) : void |
Approves a file
|
|
CheckInFile ( this web, string serverRelativeUrl, CheckinType checkinType, string comment ) : void |
Checks in a file
|
|
CheckOutFile ( this web, string serverRelativeUrl ) : void |
Checks out a file
|
|
ConvertFolderToDocumentSet ( this list, Folder folder ) : Folder |
Converts a folder with the given name as a child of the List RootFolder. Note that this only checks one level of folder (the Folders collection) and cannot accept a name with path characters. |
|
ConvertFolderToDocumentSet ( this list, string folderName ) : Folder |
Converts a folder with the given name as a child of the List RootFolder. Note that this only checks one level of folder (the Folders collection) and cannot accept a name with path characters. |
|
CreateDocumentSet ( this folder, string documentSetName, ContentTypeId contentTypeId ) : Folder |
Creates a new document set as a child of an existing folder, with the specified content type ID. |
|
CreateFolder ( this web, string folderName ) : Folder |
Creates a folder with the given name as a child of the Web. Note it is more common to create folders within an existing Folder, such as the RootFolder of a List. Note that this only checks one level of folder (the Folders collection) and cannot accept a name with path characters. |
|
DoesFolderExists ( this web, string serverRelativeFolderUrl ) : bool |
Checks if a specific folder exists
|
|
EnsureFolder ( this web, Folder parentFolder, string folderPath ) : Folder |
Ensure that the folder structure is created. This also ensures hierarchy of folders.
|
|
EnsureFolder ( this web, string folderName ) : Folder |
Checks if the folder exists at the top level of the web site, and if it does not exist creates it. Note it is more common to create folders within an existing Folder, such as the RootFolder of a List. Note that this only checks one level of folder (the Folders collection) and cannot accept a name with path characters. |
|
EnsureFolderPath ( this web, string webRelativeUrl ) : Folder |
Check if a folder exists with the specified path (relative to the web), and if not creates it (inside a list if necessary) If the specified path is inside an existing list, then the folder is created inside that list. Any existing folders are traversed, and then any remaining parts of the path are created as new folders. |
|
FindFiles ( this web, string match ) : List |
Finds files in the web. Can be slow.
|
|
FolderExists ( this web, string folderName ) : bool |
Checks if the folder exists at the top level of the web site. Note that this only checks one level of folder (the Folders collection) and cannot accept a name with path characters. |
|
GetFile ( this folder, string fileName ) : |
Gets a file in a document library.
|
|
GetFileAsString ( this web, string serverRelativeUrl ) : string |
Returns a file as string
|
|
PublishFile ( this web, string serverRelativeUrl, string comment ) : void |
Publishes a file existing on a server url
|
|
ResolveSubFolder ( this folder, string folderName ) : Folder |
Gets a folder with a given name in a given Microsoft.SharePoint.Client.Folder
|
|
SaveFileToLocal ( this web, string serverRelativeUrl, string localPath, string localFileName = null, bool>.Func |
Saves a remote file to a local folder
|
|
UploadFile ( this folder, string fileName, string localFilePath, bool overwriteIfExists ) : |
Uploads a file to the specified folder.
|
|
UploadFileWebDav ( this folder, string fileName, string localFilePath, bool overwriteIfExists ) : |
Uploads a file to the specified folder by saving the binary directly (via webdav).
|
|
VerifyIfUploadRequired ( this serverFile, Stream localStream ) : bool |
Used to compare the server file to the local file. This enables users with faster download speeds but slow upload speeds to evaluate if the server file should be overwritten.
|
|
VerifyIfUploadRequired ( this serverFile, string localFile ) : bool |
Used to compare the server file to the local file. This enables users with faster download speeds but slow upload speeds to evaluate if the server file should be overwritten.
|
Method | Description | |
---|---|---|
ConvertFolderToDocumentSetImplementation ( this list, Folder folder ) : Folder |
Internal implementation of the Folder conversion to Document set
|
|
CopyStream ( Stream source, Stream destination ) : void | ||
CreateFolderImplementation ( FolderCollection folderCollection, string folderName, Folder parentFolder = null ) : Folder | ||
EnsureFolderImplementation ( FolderCollection folderCollection, string folderName, Folder parentFolder = null ) : Folder | ||
FolderExistsImplementation ( FolderCollection folderCollection, string folderName ) : bool | ||
ParseFiles ( Folder folder, string match, ClientContext context, List |
||
PublishFileToLevel ( this file, FileLevel level ) : void | ||
SetFileProperties ( this file, string>.IDictionary |
||
UploadFile ( this folder, string fileName, Stream stream, bool overwriteIfExists ) : |
||
UploadFileWebDav ( this folder, string fileName, Stream stream, bool overwriteIfExists ) : |
||
WildcardToRegex ( string pattern ) : string |
public static ApproveFile ( this web, string serverRelativeUrl, string comment ) : void | ||
web | this | The web to process |
serverRelativeUrl | string | The server relative url of the file to approve |
comment | string | Message to be recorded with the approval |
return | void |
public static CheckInFile ( this web, string serverRelativeUrl, CheckinType checkinType, string comment ) : void | ||
web | this | The web to process |
serverRelativeUrl | string | The server relative url of the file to checkin |
checkinType | CheckinType | The type of the checkin |
comment | string | Message to be recorded with the approval |
return | void |
public static CheckOutFile ( this web, string serverRelativeUrl ) : void | ||
web | this | The web to process |
serverRelativeUrl | string | The server relative url of the file to checkout |
return | void |
public static ConvertFolderToDocumentSet ( this list, Folder folder ) : Folder | ||
list | this | List in which the folder exists |
folder | Folder | Folder to convert |
return | Folder |
public static ConvertFolderToDocumentSet ( this list, string folderName ) : Folder | ||
list | this | List in which the folder exists |
folderName | string | Folder name to convert |
return | Folder |
public static CreateDocumentSet ( this folder, string documentSetName, ContentTypeId contentTypeId ) : Folder | ||
folder | this | |
documentSetName | string | |
contentTypeId | ContentTypeId | Content type of the document set |
return | Folder |
public static CreateFolder ( this web, string folderName ) : Folder | ||
web | this | Web to check for the named folder |
folderName | string | Folder name to retrieve or create |
return | Folder |
public static DoesFolderExists ( this web, string serverRelativeFolderUrl ) : bool | ||
web | this | The web to process |
serverRelativeFolderUrl | string | Folder to check |
return | bool |
public static EnsureFolder ( this web, Folder parentFolder, string folderPath ) : Folder | ||
web | this | Web to be processed - can be root web or sub site |
parentFolder | Folder | Parent folder |
folderPath | string | Folder path |
return | Folder |
public static EnsureFolder ( this web, string folderName ) : Folder | ||
web | this | Web to check for the named folder |
folderName | string | Folder name to retrieve or create |
return | Folder |
public static EnsureFolderPath ( this web, string webRelativeUrl ) : Folder | ||
web | this | Web to check for the specified folder |
webRelativeUrl | string | Path to the folder, relative to the web site |
return | Folder |
public static FindFiles ( this web, string match ) : List |
||
web | this | The web to process |
match | string | a wildcard pattern to match |
return | List |
public static FolderExists ( this web, string folderName ) : bool | ||
web | this | Web to check for the named folder |
folderName | string | Folder name to retrieve |
return | bool |
public static GetFile ( this folder, string fileName ) : |
||
folder | this | Folder containing the target file. |
fileName | string | File name. |
return |
public static GetFileAsString ( this web, string serverRelativeUrl ) : string | ||
web | this | The Web to process |
serverRelativeUrl | string | The server relative url to the file |
return | string |
public static PublishFile ( this web, string serverRelativeUrl, string comment ) : void | ||
web | this | The web to process |
serverRelativeUrl | string | the server relative url of the file to publish |
comment | string | Comment recorded with the publish action |
return | void |
public static ResolveSubFolder ( this folder, string folderName ) : Folder | ||
folder | this | |
folderName | string | Name of the folder to search for |
return | Folder |
public static SaveFileToLocal ( this web, string serverRelativeUrl, string localPath, string localFileName = null, bool>.Func |
||
web | this | The Web to process |
serverRelativeUrl | string | The server relative url to the file |
localPath | string | The local folder |
localFileName | string | The local filename. If null the filename of the file on the server will be used |
fileExistsCallBack | bool>.Func | Optional callback function allowing to provide feedback if the file should be overwritten if it exists. The function requests a bool as return value and the string input contains the name of the file that exists. |
return | void |
public static UploadFile ( this folder, string fileName, string localFilePath, bool overwriteIfExists ) : |
||
folder | this | Folder to upload file to. |
fileName | string | |
localFilePath | string | Location of the file to be uploaded. |
overwriteIfExists | bool | true (default) to overwite existing files |
return |
public static UploadFileWebDav ( this folder, string fileName, string localFilePath, bool overwriteIfExists ) : |
||
folder | this | Folder to upload file to. |
fileName | string | |
localFilePath | string | Location of the file to be uploaded. |
overwriteIfExists | bool | true (default) to overwite existing files |
return |
public static VerifyIfUploadRequired ( this serverFile, Stream localStream ) : bool | ||
serverFile | this | File located on the server. |
localStream | Stream | Stream to validate against. |
return | bool |
public static VerifyIfUploadRequired ( this serverFile, string localFile ) : bool | ||
serverFile | this | File located on the server. |
localFile | string | File to validate against. |
return | bool |