Recently, I'm using SharpSSH to deal with remote files. The SharpSSH offers API of rmdir
for removing remote directories, but I find that it throws exceptions with message "Permission denied" when the directory is not empty. Then I've got to delete each file before the final rmdir
recursively, which is not efficient.
So how could I use this rmdir
without the fool recursive deletion?