ContentIterator.ProcessFilesInFolder method (SPFolder, Boolean, ContentIterator.FileProcessor, ContentIterator.FileProcessorErrorCallout)
Iterates over items in a folder.
Namespace: Microsoft.Office.Server.Utilities
Assembly: Microsoft.Office.Server (in Microsoft.Office.Server.dll)
Syntax
'Declaration
Public Sub ProcessFilesInFolder ( _
folder As SPFolder, _
fRecursive As Boolean, _
fileProcessor As ContentIterator.FileProcessor, _
errorCallout As ContentIterator.FileProcessorErrorCallout _
)
'Usage
Dim instance As ContentIterator
Dim folder As SPFolder
Dim fRecursive As Boolean
Dim fileProcessor As ContentIterator.FileProcessor
Dim errorCallout As ContentIterator.FileProcessorErrorCallout
instance.ProcessFilesInFolder(folder, _
fRecursive, fileProcessor, errorCallout)
public void ProcessFilesInFolder(
SPFolder folder,
bool fRecursive,
ContentIterator.FileProcessor fileProcessor,
ContentIterator.FileProcessorErrorCallout errorCallout
)
Parameters
folder
Type: Microsoft.SharePoint.SPFolderThe SPFolder object to iterate over.
fRecursive
Type: System.BooleanIf true, iterate over all items in all subfolders.
fileProcessor
Type: Microsoft.Office.Server.Utilities.ContentIterator.FileProcessorThe callout to process each file.
errorCallout
Type: Microsoft.Office.Server.Utilities.ContentIterator.FileProcessorErrorCalloutThe optional callout to handle errors.
Remarks
This method does paged queries to fetch the requested files and calls fileProcessor for each file and calls the optional errorCallout if an exception occurs while processing a file.