/// <summary> /// 从ftp删除 /// </summary> /// <param name="ftpRoot">ftp服务根目录</param> /// <returns></returns> public async Task <bool> DeleteAsync(Uri ftpRoot) { var client = new FtpClient(ftpRoot); return(await client.DeleteFileAsync(this.FileName)); }
/// <summary> /// 保存到ftp /// </summary> /// <param name="ftpRoot">ftp服务根目录</param> /// <returns></returns> public virtual async Task <Uri> SaveAsync(Uri ftpRoot) { var client = new FtpClient(ftpRoot); return(await client.UploadFileAsync(this.Stream, this.FileName)); }