public static async Task <bool> DeleteRecursiveAsync(this IZookeeperClient client, string path) { IEnumerable <string> children; try { children = await client.GetChildrenAsync(path); } catch (KeeperException.NoNodeException) { return(true); } foreach (string subPath in children) { if (!await client.DeleteRecursiveAsync(path + "/" + subPath)) { return(false); } } await client.DeleteAsync(path); return(true); }
public async Task GetChildrenAsyncTest() { var childrens = await _client.GetChildrenAsync("/"); //childrens = await _client.GetChildrenAsync("/ApiRouteRoot"); }