IHadoopStorageAsyncClient.DeleteAsync Method (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.
Deletes a file or directory at the given path.
Namespace: Microsoft.Hadoop.Client.HadoopStorageClientLayer
Assembly: Microsoft.Hadoop.Client (in Microsoft.Hadoop.Client.dll)
Syntax
Task<bool> DeleteAsync(
string path,
Nullable<bool> recursive
)
Task<bool>^ DeleteAsync(
String^ path,
Nullable<bool> recursive
)
abstract DeleteAsync :
path:string *
recursive:Nullable<bool> -> Task<bool>
Function DeleteAsync (
path As String,
recursive As Nullable(Of Boolean)
) As Task(Of Boolean)
Parameters
path
Type: System.StringThe path to delete.
recursive
Type: System.Nullable<Boolean>If path is a directory and set to true, the directory is deleted else throws an exception. In case of a file the recursive can be set to either true or false.
Return Value
Type: System.Threading.Tasks.Task<Boolean>
True if delete is successful, otherwise false.
See Also
DeleteAsync Overload
IHadoopStorageAsyncClient Interface
Microsoft.Hadoop.Client.HadoopStorageClientLayer Namespace
Return to top