public void BeginGetFile(string localFile, string remoteFile, FtpFileEventHandler callback) { InitHashtable(); FtpFile file = (FtpFile)m_files[remoteFile]; if (file == null) { throw new FtpException("Remote file (" + remoteFile + ") not found. Try refresh the directory."); } FtpFileTransferer transfer = new FtpFileTransferer( this, localFile, remoteFile, file.Size, TransferDirection.Download); transfer.StartAsyncTransfer(callback); }
public void BeginPutFile(string localFile, string remoteFile, FtpFileEventHandler callback) { CheckSessionCurrentDirectory(); FileInfo fi = new FileInfo(localFile); if (remoteFile == null) { remoteFile = fi.Name; } FtpFileTransferer transfer = new FtpFileTransferer( this, localFile, remoteFile, fi.Length, TransferDirection.Upload); transfer.StartAsyncTransfer(callback); }
public void PutFile(string localFile, string remoteFile) { CheckSessionCurrentDirectory(); FileInfo fi = new FileInfo(localFile); if (remoteFile == null) { remoteFile = fi.Name; } FtpFileTransferer transfer = new FtpFileTransferer( this, localFile, remoteFile, fi.Length, TransferDirection.Upload); transfer.StartTransfer(); }
public void BeginGetFile(string localFile, string remoteFile, FtpFileEventHandler callback) { InitHashtable(); FtpFile file = (FtpFile)m_files[remoteFile]; if (file == null) throw new FtpException("Remote file (" + remoteFile + ") not found. Try refresh the directory."); FtpFileTransferer transfer = new FtpFileTransferer( this, localFile, remoteFile, file.Size, TransferDirection.Download); transfer.StartAsyncTransfer(callback); }
public void BeginPutFile(string localFile, string remoteFile, FtpFileEventHandler callback) { CheckSessionCurrentDirectory(); FileInfo fi = new FileInfo(localFile); if (remoteFile == null) remoteFile = fi.Name; FtpFileTransferer transfer = new FtpFileTransferer( this, localFile, remoteFile, fi.Length, TransferDirection.Upload); transfer.StartAsyncTransfer(callback); }
public void PutFile(string localFile, string remoteFile) { CheckSessionCurrentDirectory(); FileInfo fi = new FileInfo(localFile); if (remoteFile == null) remoteFile = fi.Name; FtpFileTransferer transfer = new FtpFileTransferer( this, localFile, remoteFile, fi.Length, TransferDirection.Upload); transfer.StartTransfer(); }