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

  • fRecursive
    Type: System.Boolean

    If true, iterate over all of the items in the subfolders and the folder; otherwise, false.

  • fIncludeFolderItems
    Type: System.Boolean

    If true, list items that are folders will be returned; if false, they are filtered out

  • fIterateInReverseOrder
    Type: System.Boolean

    If true, iteration is done from the last element in the collection to the first; if false, iteration is done from first element to last.

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.

See also

Reference

ContentIterator class

ContentIterator members

ProcessItemsInFolder overload

Microsoft.Office.Server.Utilities namespace