public void Download(string cpath, string lpath) { if (FTP) { _ftpc.GetFile(cpath, lpath, FileAction.Create); } else { using (var f = new FileStream(lpath, FileMode.Create, FileAccess.ReadWrite)) _sftpc.DownloadFile(cpath, f); } }