File.OpenBinaryDirect Method (ClientContext, String)

Downloads the specified file from a SharePoint site without requiring an ExecuteQuery() method call.

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

Syntax

'Declaration
Public Shared Function OpenBinaryDirect ( _
    context As ClientContext, _
    serverRelativeUrl As String _
) As FileInformation
'Usage
Dim context As ClientContext
Dim serverRelativeUrl As String
Dim returnValue As FileInformation

returnValue = File.OpenBinaryDirect(context, _
    serverRelativeUrl)
public static FileInformation OpenBinaryDirect(
    ClientContext context,
    string serverRelativeUrl
)

Parameters

  • serverRelativeUrl
    Type: System.String

    A string that represents the server-relative URL of the file.

Return Value

Type: Microsoft.SharePoint.Client.FileInformation
A FileInformation object that contains a reference to the file stream.

See Also

Reference

File Class

File Members

OpenBinaryDirect Overload

Microsoft.SharePoint.Client Namespace