Interface IFolder
Public interface to define a Folder object
Assembly: PnP.Core.dll
Syntax
public interface IFolder : IDataModel<IFolder>, IDataModelParent, IDataModelWithContext, ISupportModules<IFolder>, IDataModelGet<IFolder>, IDataModelLoad<IFolder>, IDataModelUpdate, IDataModelDelete, IDataModelSupportingGetChanges, IQueryableDataModel
Properties
A special property used to add an asterisk to a $select statement
Declaration
Property Value
Default ordered list of content types on a list, before adjustments
Declaration
IContentTypeIdCollection ContentTypeOrder { get; }
Property Value
Gets whether the folder exists,
Declaration
Property Value
Gets the collection of files contained in the folder
Declaration
IFileCollection Files { get; }
Property Value
Declaration
IFolderCollection Folders { get; }
Property Value
Indicate whether the folder is enabled for WOPI default action.
Declaration
bool IsWOPIEnabled { get; }
Property Value
Gets a value that specifies the count of items in the list folder.
Declaration
Property Value
Gets the list item field values for the list item corresponding to the file.
Declaration
IListItem ListItemAllFields { get; }
Property Value
Gets the name of the folder.
Declaration
Property Value
Gets the parent list folder of the folder.
Declaration
IFolder ParentFolder { get; }
Property Value
Gets a string that identifies the application in which the folder was created.
Declaration
Property Value
Gets the collection of all properties defined for this folder.
Declaration
IPropertyValues Properties { get; }
Property Value
Gets the server-relative URL of the list folder.
Declaration
string ServerRelativeUrl { get; }
Property Value
Get the storage metrics of the folder.
Declaration
IStorageMetrics StorageMetrics { get; }
Property Value
Gets the creation time of the folder.
Declaration
DateTime TimeCreated { get; }
Property Value
Gets the last modification time of the folder.
Declaration
DateTime TimeLastModified { get; }
Property Value
Ordered list of content types on a list: controls order of items in the "New" menu and "List Settings" page
Declaration
IContentTypeIdCollection UniqueContentTypeOrder { get; }
Property Value
Gets the Unique Id of the folder.
Declaration
Property Value
Gets or sets a value that specifies folder-relative URL for the list folder welcome page.
Declaration
string WelcomePage { get; set; }
Property Value
Methods
Add a folder to the current folder.
Declaration
IFolder AddFolder(string name)
Parameters
System.String
name
The name of the folder to add.
|
Returns
Add a folder to the current folder.
Declaration
Task<IFolder> AddFolderAsync(string name)
Parameters
System.String
name
The name of the folder to add.
|
Returns
Add a folder to the current folder via batch.
Declaration
IFolder AddFolderBatch(Batch batch, string name)
Parameters
Batch
batch
Batch to add the reques to
|
System.String
name
The name of the folder to add.
|
Returns
Add a folder to the current folder via batch.
Declaration
IFolder AddFolderBatch(string name)
Parameters
System.String
name
The name of the folder to add.
|
Returns
Add a folder to the current folder via batch.
Declaration
Task<IFolder> AddFolderBatchAsync(Batch batch, string name)
Parameters
Batch
batch
Batch to add the reques to
|
System.String
name
The name of the folder to add.
|
Returns
Add a folder to the current folder via batch.
Declaration
Task<IFolder> AddFolderBatchAsync(string name)
Parameters
System.String
name
The name of the folder to add.
|
Returns
Classifies and extracts all unprocessed files in this folder and it's sub folders via the Syntex off-peak queue
Declaration
ISyntexClassifyAndExtractResult ClassifyAndExtractOffPeak()
Returns
Classifies and extracts all unprocessed files in this folder and it's sub folders via the Syntex off-peak queue
Declaration
Task<ISyntexClassifyAndExtractResult> ClassifyAndExtractOffPeakAsync()
Returns
Copies a folder to the destination URL.
Declaration
void CopyTo(string destinationUrl, MoveCopyOptions options = null)
Parameters
System.String
destinationUrl
The destination URL.
|
MoveCopyOptions
options
options of the copy operation.
|
Copies a folder to the destination URL.
Declaration
Task CopyToAsync(string destinationUrl, MoveCopyOptions options = null)
Parameters
System.String
destinationUrl
The destination URL.
|
MoveCopyOptions
options
options of the copy operation.
|
Returns
Copies a folder to the destination URL.
Declaration
void CopyToBatch(Batch batch, string destinationUrl, MoveCopyOptions options = null)
Parameters
Batch
batch
The batch instance to use.
|
System.String
destinationUrl
The destination URL.
|
MoveCopyOptions
options
options of the copy operation.
|
Copies a folder to the destination URL.
Declaration
void CopyToBatch(string destinationUrl, MoveCopyOptions options = null)
Parameters
System.String
destinationUrl
The destination URL.
|
MoveCopyOptions
options
options of the copy operation.
|
Copies a folder to the destination URL.
Declaration
Task CopyToBatchAsync(Batch batch, string destinationUrl, MoveCopyOptions options = null)
Parameters
Batch
batch
The batch instance to use.
|
System.String
destinationUrl
The destination URL.
|
MoveCopyOptions
options
options of the copy operation.
|
Returns
Copies a folder to the destination URL.
Declaration
Task CopyToBatchAsync(string destinationUrl, MoveCopyOptions options = null)
Parameters
System.String
destinationUrl
The destination URL.
|
MoveCopyOptions
options
options of the copy operation.
|
Returns
Creates an anonymous sharing link for a file
Declaration
IGraphPermission CreateAnonymousSharingLink(AnonymousLinkOptions anonymousLinkOptions)
Parameters
Returns
Creates an anonymous sharing link for a file
Declaration
Task<IGraphPermission> CreateAnonymousSharingLinkAsync(AnonymousLinkOptions anonymousLinkOptions)
Parameters
Returns
Creates an organization sharing link for a file
Declaration
IGraphPermission CreateOrganizationalSharingLink(OrganizationalLinkOptions organizationalLinkOptions)
Parameters
Returns
Creates an organization sharing link for a file
Declaration
Task<IGraphPermission> CreateOrganizationalSharingLinkAsync(OrganizationalLinkOptions organizationalLinkOptions)
Parameters
Returns
Creates a sharing invite to a specific user
Declaration
IGraphPermission CreateSharingInvite(InviteOptions inviteOptions)
Parameters
Returns
Creates a sharing invite to a specific user
Declaration
Task<IGraphPermission> CreateSharingInviteAsync(InviteOptions inviteOptions)
Parameters
Returns
Creates a user sharing link for a file
Declaration
IGraphPermission CreateUserSharingLink(UserLinkOptions userLinkOptions)
Parameters
Returns
Creates a user sharing link for a file
Declaration
Task<IGraphPermission> CreateUserSharingLinkAsync(UserLinkOptions userLinkOptions)
Parameters
Returns
Deletes the share links on the file item
Declaration
Deletes the share links on the file item
Declaration
Task DeleteShareLinksAsync()
Returns
Ensures a (hiarchy) of folders exists on a given folder
Declaration
IFolder EnsureFolder(string folderRelativeUrl, params Expression<Func<IFolder, object>>[] expressions)
Parameters
System.String
folderRelativeUrl
a (hiarchy) of folders (e.g. folderA/folderB/FolderC)
|
Expression<Func<IFolder, System.Object>>[]
expressions
Expressions needed to create the request, only used when the folder exists, if the returned folder was newly created the default properties are returned
|
Returns
IFolder
The IFolder representing the final folder in the hiarchy (e.g. FolderC)
|
Ensures a (hiarchy) of folders exists on a given folder
Declaration
Task<IFolder> EnsureFolderAsync(string folderRelativeUrl, params Expression<Func<IFolder, object>>[] expressions)
Parameters
System.String
folderRelativeUrl
a (hiarchy) of folders (e.g. folderA/folderB/FolderC)
|
Expression<Func<IFolder, System.Object>>[]
expressions
Expressions needed to create the request, only used when the folder exists, if the returned folder was newly created the default properties are returned
|
Returns
Task<IFolder>
The IFolder representing the final folder in the hiarchy (e.g. FolderC)
|
Find files in the folder, can be slow as it iterates over all the files in the folder and it's sub folders. If performance
is key, then try using a search based solution
Declaration
List<IFile> FindFiles(string match)
Parameters
Returns
PnP.Core.Model.SharePoint.List<IFile>
A of found files as type IFile
|
Find files in the folder, can be slow as it iterates over all the files in the folder and it's sub folders. If performance
is key, then try using a search based solution
Declaration
Task<List<IFile>> FindFilesAsync(string match)
Parameters
Returns
Task<PnP.Core.Model.SharePoint.List<IFile>>
A of found files as type IFile
|
Gets the share links on the file item
Declaration
IGraphPermissionCollection GetShareLinks()
Returns
Gets the share links on the file item
Declaration
Task<IGraphPermissionCollection> GetShareLinksAsync()
Returns
Moves a folder to the destination URL.
Declaration
void MoveTo(string destinationUrl, MoveCopyOptions options = null)
Parameters
System.String
destinationUrl
The destination URL.
|
MoveCopyOptions
options
options of the move operation.
|
Moves a folder to the destination URL.
Declaration
Task MoveToAsync(string destinationUrl, MoveCopyOptions options = null)
Parameters
System.String
destinationUrl
The destination URL.
|
MoveCopyOptions
options
options of the move operation.
|
Returns
Moves a folder to the destination URL.
Declaration
void MoveToBatch(Batch batch, string destinationUrl, MoveCopyOptions options = null)
Parameters
Batch
batch
The batch instance to use.
|
System.String
destinationUrl
The destination URL.
|
MoveCopyOptions
options
options of the move operation.
|
Moves a folder to the destination URL.
Declaration
void MoveToBatch(string destinationUrl, MoveCopyOptions options = null)
Parameters
System.String
destinationUrl
The destination URL.
|
MoveCopyOptions
options
options of the move operation.
|
Moves a folder to the destination URL.
Declaration
Task MoveToBatchAsync(Batch batch, string destinationUrl, MoveCopyOptions options = null)
Parameters
Batch
batch
The batch instance to use.
|
System.String
destinationUrl
The destination URL.
|
MoveCopyOptions
options
options of the move operation.
|
Returns
Moves a folder to the destination URL.
Declaration
Task MoveToBatchAsync(string destinationUrl, MoveCopyOptions options = null)
Parameters
System.String
destinationUrl
The destination URL.
|
MoveCopyOptions
options
options of the move operation.
|
Returns
Declaration
Parameters
System.String
name
New folder name
|
Declaration
Task RenameAsync(string name)
Parameters
System.String
name
New folder name
|
Returns
Extension Methods