void RecursiveDirectoryDelete(Storage storage, string path) { if (path.Length > 0) { path += "/"; } foreach (var subDirectory in storage.GetDirectoryNames(path + "*")) { RecursiveDirectoryDelete(storage, path + subDirectory); } DeleteFiles(storage, path); storage.DeleteDirectory(path); }
void RecursiveDirectoryDelete(Storage storage, string path) { if (path.Length > 0) path += "/"; foreach (var subDirectory in storage.GetDirectoryNames(path + "*")) { RecursiveDirectoryDelete(storage, path + subDirectory); } DeleteFiles(storage, path); storage.DeleteDirectory(path); }