IHadoopStorageAsyncClient.WriteAsync Method (Stream, String, Nullable<Boolean>)

 

Note

This version of the HDInsight .NET SDK is deprecated and will be removed by January 1, 2017. You are encouraged to use the newer ARM-based version of HDInsight .NET SDK going forward. For instructions on how to use the new HDInsight .NET SDK to create a cluster, see Create HDInsight Linux clusters using .NET SDK. For instructions on how to submit jobs using the new .NET SDK and other approaches, see Submit jobs to an HDInsight cluster. The HDInsight SDK reference for the newer version is available at HDInsight .NET SDK Reference.

Writes the content of the input stream to a file on a file system.

Namespace:   Microsoft.Hadoop.Client.HadoopStorageClientLayer
Assembly:  Microsoft.Hadoop.Client (in Microsoft.Hadoop.Client.dll)

Syntax

Task<string> WriteAsync(
    Stream content,
    string path,
    Nullable<bool> overwrite
)
Task<String^>^ WriteAsync(
    Stream^ content,
    String^ path,
    Nullable<bool> overwrite
)
abstract WriteAsync : 
        content:Stream *
        path:string *
        overwrite:Nullable<bool> -> Task<string>
Function WriteAsync (
    content As Stream,
    path As String,
    overwrite As Nullable(Of Boolean)
) As Task(Of String)

Parameters

  • overwrite
    Type: System.Nullable<Boolean>

    If overwrite is set to true, the existing file will be overwritten. If the file exists and overwrite is not set or it's set to false, an error will be thrown.

Return Value

Type: System.Threading.Tasks.Task<String>

Path of the file created.

See Also

WriteAsync Overload
IHadoopStorageAsyncClient Interface
Microsoft.Hadoop.Client.HadoopStorageClientLayer Namespace

Return to top