ContentIterator.GetFileInFolder method

Gets the specified file from the specified folder without inflating the entire Files property collection.

Namespace:  Microsoft.Office.Server.Utilities
Assembly:  Microsoft.Office.Server (in Microsoft.Office.Server.dll)

Syntax

'Declaration
Public Shared Function GetFileInFolder ( _
    folder As SPFolder, _
    fileUrl As String _
) As SPFile
'Usage
Dim folder As SPFolder
Dim fileUrl As String
Dim returnValue As SPFile

returnValue = ContentIterator.GetFileInFolder(folder, _
    fileUrl)
public static SPFile GetFileInFolder(
    SPFolder folder,
    string fileUrl
)

Parameters

  • fileUrl
    Type: System.String

    The folder-relative URL for the specified file.

Return value

Type: Microsoft.SharePoint.SPFile
A SPFile instance, or an ArgumentOutOfRangeException object.
Returns SPFile.

See also

Reference

ContentIterator class

ContentIterator members

Microsoft.Office.Server.Utilities namespace