共用方式為


SPFile.OpenBinaryStream method (SPOpenBinaryOptions, String, String)

開啟的檔案當做資料流,根據指定的選項。

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

Syntax

'宣告
Public Function OpenBinaryStream ( _
    openOptions As SPOpenBinaryOptions, _
    etagNotMatch As String, _
    <OutAttribute> ByRef etagNew As String _
) As Stream
'用途
Dim instance As SPFile
Dim openOptions As SPOpenBinaryOptions
Dim etagNotMatch As String
Dim etagNew As String
Dim returnValue As Stream

returnValue = instance.OpenBinaryStream(openOptions, _
    etagNotMatch, etagNew)
public Stream OpenBinaryStream(
    SPOpenBinaryOptions openOptions,
    string etagNotMatch,
    out string etagNew
)

參數

  • etagNotMatch
    Type: System.String

    要使用的不相符的ETag值。如果永遠開啟a null reference (Nothing in Visual Basic),該檔案。如果不是a null reference (Nothing in Visual Basic) ,並比對作業就會失敗,會擲回例外狀況。

  • etagNew
    Type: System.String

    這個方法傳回時,包含新開啟檔案的ETagString 。這個參數會傳遞未初始化。

傳回值

Type: System.IO.Stream
System.IO.Stream物件,表示該檔案。

請參閱

參照

SPFile class

SPFile members

OpenBinaryStream overload

Microsoft.SharePoint namespace