ContentIterator.ProcessItemsInFolder Method (SPList, SPFolder, Boolean, Boolean, ContentIterator.ItemProcessor, ContentIterator.ItemProcessorErrorCallout)
Iterates over items in a folder.
Namespace: Microsoft.Office.Server.Utilities
Assembly: Microsoft.Office.Server (in Microsoft.Office.Server.dll)
Syntax
'Declaration
Public Sub ProcessItemsInFolder ( _
list As SPList, _
folder As SPFolder, _
fRecursive As Boolean, _
fIncludeFolderItems As Boolean, _
itemProcessor As ContentIterator.ItemProcessor, _
errorCallout As ContentIterator.ItemProcessorErrorCallout _
)
'Usage
Dim instance As ContentIterator
Dim list As SPList
Dim folder As SPFolder
Dim fRecursive As Boolean
Dim fIncludeFolderItems As Boolean
Dim itemProcessor As ContentIterator.ItemProcessor
Dim errorCallout As ContentIterator.ItemProcessorErrorCallout
instance.ProcessItemsInFolder(list, folder, _
fRecursive, fIncludeFolderItems, _
itemProcessor, errorCallout)
public void ProcessItemsInFolder(
SPList list,
SPFolder folder,
bool fRecursive,
bool fIncludeFolderItems,
ContentIterator.ItemProcessor itemProcessor,
ContentIterator.ItemProcessorErrorCallout errorCallout
)
Parameters
- list
Type: Microsoft.SharePoint.SPList
The SPList object that contains the folder.
- folder
Type: Microsoft.SharePoint.SPFolder
The SPFolder object to iterate over.
- fRecursive
Type: System.Boolean
If true, iterate over all items in a subfolder.
- fIncludeFolderItems
Type: System.Boolean
If true, list items that are folders that will be returned; if false, items that are folders are filtered out.
- itemProcessor
Type: Microsoft.Office.Server.Utilities.ContentIterator.ItemProcessor
The callout to process the list items returned by the query.
- errorCallout
Type: Microsoft.Office.Server.Utilities.ContentIterator.ItemProcessorErrorCallout
The optional callout to handle errors.
Remarks
This method uses paged queries to fetch the requested items, callsitemProcessor for each item, and calls the optional errorCallout if an exception occurs while processing an item.