public ListDirectoryProvider(FTPClient ftpClient, ILogger logger, FTPClientConfiguration configuration) { this.ftpClient = ftpClient; this.logger = logger; this.configuration = configuration; directoryParsers = new List <IListDirectoryParser> { new UnixDirectoryParser(logger), new DOSDirectoryParser(logger), }; }
public void Configure(FTPClientConfiguration configuration) { Configuration = configuration; if (configuration.Host == null) { throw new ArgumentNullException(nameof(configuration.Host)); } if (Uri.IsWellFormedUriString(configuration.Host, UriKind.Absolute)) { configuration.Host = new Uri(configuration.Host).Host; } ControlStream = new FTPControlStream(Configuration, new DnsResolver()); Configuration.BaseDirectory = $"/{Configuration.BaseDirectory.TrimStart('/')}"; }
public FTPControlStream(FTPClientConfiguration configuration, IDnsResolver dnsResolver) { Logger?.LogDebug("Constructing new FtpSocketStream"); Configuration = configuration; this.dnsResolver = dnsResolver; }
public MlsdDirectoryProvider(FTPClient ftpClient, ILogger logger, FTPClientConfiguration configuration) { this.ftpClient = ftpClient; this.configuration = configuration; this.logger = logger; }
public FTPClient(FTPClientConfiguration configuration) { Configure(configuration); }