For anyone interested, here’s the code to delete recursively:
private static void DeleteDirectory(string path)
{
client.ChangeDirectory(path);
Aspose.Network.Ftp.ListItem[] list = client.ListDirectoryDetails();
for (int i = 0; i < list.Length; i++)
{
if (list[i].ItemType == Aspose.Network.Ftp.ListItemType.File)
{
client.Delete(path + “/” + list[i].Name);
}
else if (list[i].ItemType == Aspose.Network.Ftp.ListItemType.Directory)
{
DeleteDirectory(path + “/” + list[i].Name);
}
}
client.ChangeDirectoryUp();
client.RemoveDirectory(path);
}