public override bool DeleteResource(IStorageProviderSession session, ICloudFileSystemEntry entry) { // get the creds ICredentials creds = ((GenericNetworkCredentials)session.SessionToken).GetCredential(null, null); // generate the loca path String uriPath = GetResourceUrl(session, entry, null); // removed the file if (entry is ICloudDirectoryEntry) { // we need an empty directory foreach (ICloudFileSystemEntry child in (ICloudDirectoryEntry)entry) { DeleteResource(session, child); } // remove the directory return(_ftpService.FtpDeleteEmptyDirectory(uriPath, creds)); } else { // remove the file return(_ftpService.FtpDeleteFile(uriPath, creds)); } }