public FtpWrapper(IEnumerable <ApplicationFileInfo> localSet, string rootDirectory = null, string[] skipFiles = null) { this.localSet = localSet; this.rootDirectory = rootDirectory; this.skipFiles = skipFiles; this.ftp = null; scanLocalSet(); }
public void Dispose() { if (ftp != null) { ftp.Dispose(); ftp = null; } }
private IEnumerable <ArxOne.Ftp.FtpEntry> _list(ArxOne.Ftp.FtpClient client, string path) { if (client.ServerFeatures.HasFeature("MLSD")) { return(client.MlsdEntries(path)); } else { return(client.ListEntries(path)); } }
public bool Connect(string host, int port, string username, string password) { try { ftp = new ArxOne.Ftp.FtpClient(new Uri($"ftp://{host}:{port}"), new NetworkCredential(username, password)); return(true); } catch (Exception ex) { Trace.WriteLine(ex.Message); } return(false); }
public FtpClientPoolArxOne(int maxPoolSize, FtpConfig ftpConfig) : base(ftpConfig, maxPoolSize) { _client = _getClient(); _semaphore = new SemaphoreSlim(maxPoolSize, maxPoolSize); }
public FtpClientPoolArxOne(int maxPoolSize, Uri uri, NetworkCredential credentials) : base(uri, credentials, maxPoolSize) { _client = _getClient(); _semaphore = new SemaphoreSlim(maxPoolSize, maxPoolSize); }
/// <summary> /// Initializes a new instance of the <see cref="FtpConnection"/> class. /// </summary> /// <param name="client">The FTP client.</param> public FtpConnection(FtpClient client) { Client = client; }