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
- folder
Type: Microsoft.SharePoint.SPFolder
The SPFolder to get the specified file from.
- 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.