public async Task DeleteDirectoryAsync(string destinationDirectoryPath, bool recursive) { try { await _files.DeleteDirectoryAsync(destinationDirectoryPath, recursive); } catch (Exception e) { throw new RemoteNodeException(_machine, e); } }
public void DeleteDirectoryRecursive(string destinationDirectoryPath) { var operation = _operationTracker.BeginDeleteDirectory(destinationDirectoryPath); try { _files.DeleteDirectoryAsync(destinationDirectoryPath, recursive: true).Wait(); operation.Success(); } catch (Exception e) { operation.Failed(e); throw; } }