public override async Task Remove(string cpath, bool isFolder = false)
{
var caughtException = default(Exception);
await Task.Run(() =>
{
try
{
if (isFolder)
{
_sftpc.DeleteDirectory(cpath);
}
else
{
_sftpc.Delete(cpath);
}
}
catch (Exception ex)
{
ex.LogException();
caughtException = ex;
}
});
if (caughtException != default(Exception))
{
throw caughtException;
}
}