다음을 통해 공유


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