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)
Available in Sandboxed Solutions: No
Available in SharePoint Online

Syntax

'Declaration
<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.MarshalByRefObject)> _
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)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.MarshalByRefObject)]
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