SPWeb.GetFile Method (Guid)

Gets the file object with the specified identifier (ID).

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Function GetFile ( _
    uniqueId As Guid _
) As SPFile
'Usage
Dim instance As SPWeb
Dim uniqueId As Guid
Dim returnValue As SPFile

returnValue = instance.GetFile(uniqueId)
public SPFile GetFile(
    Guid uniqueId
)

Parameters

  • uniqueId
    Type: System.Guid

    The ID of the file object.

Return Value

Type: Microsoft.SharePoint.SPFile
The file object.

Remarks

This method calls the SPFile constructor with this and uniqueId.

See Also

Reference

SPWeb Class

SPWeb Members

GetFile Overload

Microsoft.SharePoint Namespace