Share via


SPFeatureDefinition.GetFile method

Gets the stream of the file for the specified file in the SPFeature object.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Function GetFile ( _
    featureRelativePath As String _
) As Stream
'Usage
Dim instance As SPFeatureDefinition
Dim featureRelativePath As String
Dim returnValue As Stream

returnValue = instance.GetFile(featureRelativePath)
public Stream GetFile(
    string featureRelativePath
)

Parameters

  • featureRelativePath
    Type: System.String

    The feature relative path of the file.

Return value

Type: System.IO.Stream
The stream for the file that is found at featureRelativePath.

Exceptions

Exception Condition
ArgumentNullException

Thrown when the featureRelativePath is a null reference (Nothing in Visual Basic).

FileNotFoundException

Thrown when the featureRelativePath does not exist.

See also

Reference

SPFeatureDefinition class

SPFeatureDefinition members

Microsoft.SharePoint.Administration namespace