ContentIterator.ProcessItemsInFolder method (SPList, SPFolder, Boolean, 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, _
fIterateInReverseOrder 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 fIterateInReverseOrder As Boolean
Dim itemProcessor As ContentIterator.ItemProcessor
Dim errorCallout As ContentIterator.ItemProcessorErrorCallout
instance.ProcessItemsInFolder(list, folder, _
fRecursive, fIncludeFolderItems, _
fIterateInReverseOrder, itemProcessor, _
errorCallout)
public void ProcessItemsInFolder(
SPList list,
SPFolder folder,
bool fRecursive,
bool fIncludeFolderItems,
bool fIterateInReverseOrder,
ContentIterator.ItemProcessor itemProcessor,
ContentIterator.ItemProcessorErrorCallout errorCallout
)
Parameters
list
Type: Microsoft.SharePoint.SPListThe list containing the folder.
folder
Type: Microsoft.SharePoint.SPFolderThe folder to iterate over.
fRecursive
Type: System.BooleanIf true, iterate over all of the items in the subfolders and the folder; otherwise, false.
fIncludeFolderItems
Type: System.BooleanIf true, list items that are folders will be returned; if false, they are filtered out
fIterateInReverseOrder
Type: System.BooleanIf true, iteration is done from the last element in the collection to the first; if false, iteration is done from first element to last.
itemProcessor
Type: Microsoft.Office.Server.Utilities.ContentIterator.ItemProcessorThe callout to process the list items returned by the query.
errorCallout
Type: Microsoft.Office.Server.Utilities.ContentIterator.ItemProcessorErrorCalloutThe optional callout to handle errors.
Remarks
This method does paged queries to fetch the requested items and calls itemProcessor for each item and calls the optional errorCallout if an exception occurs while processing an item.