Hi again, is there a method to recursively delete a directory or should i implement it ?
Edit: no big deal this should work ok:
///<summary>/// Deletes the directory recursively.///</summary>///<param name="remoteDirectory">The remote directory.</param>protectedvoid DeleteDirectoryRecursive(string remoteDirectory) { if (!Client.Exists(remoteDirectory)) return; foreach (var file in Client.ListDirectory(remoteDirectory)) { if (file.Name.Equals(".") || file.Name.Equals("..")) continue; if (file.IsDirectory) DeleteDirectoryRecursive(file.FullName); else Client.DeleteFile(file.FullName); } Client.DeleteDirectory(remoteDirectory); }
Thanks