internal FTPInfo(string name, DateTime lastAccessTime, FTPClient client, FTPDirectoryInfo parent) { this.name = name.Trim(' ', '\n', '\r', '\t', '\\', '/'); this.lastAccessTime = lastAccessTime; this._client = client; this.parent = parent; }
public FTPClient(string server, string username, string password, TimeSpan updateInterval) { this.server = server.Replace('\\', '/').Trim().Trim('/') + "/"; this.credentials = new NetworkCredential(username, password); if (this.server.Substring(0, 6).ToLower() != "ftp://") this.server = "ftp://" + this.server; this.root = new FTPDirectoryInfo("", DateTime.MinValue, this, null); if (updateInterval.TotalSeconds < 0) throw new ArgumentOutOfRangeException("updateInterval"); this.updateInterval = updateInterval; }
public FTPClient(string server, string username, string password, TimeSpan updateInterval) { this.server = server.Replace('\\', '/').Trim().Trim('/') + "/"; this.credentials = new NetworkCredential(username, password); if (this.server.Substring(0, 6).ToLower() != "ftp://") { this.server = "ftp://" + this.server; } this.root = new FTPDirectoryInfo("", DateTime.MinValue, this, null); if (updateInterval.TotalSeconds < 0) { throw new ArgumentOutOfRangeException("updateInterval"); } this.updateInterval = updateInterval; }
internal FTPFileInfo(string name, DateTime lastAccessTime, FTPClient client, FTPDirectoryInfo parent) : base(name, lastAccessTime, client, parent) { }
internal FTPDirectoryInfo(string name, DateTime lastAccessTime, FTPClient client, FTPDirectoryInfo parent) : base(name, lastAccessTime, client, parent) { this.directories = new Dictionary<string, FTPDirectoryInfo>(StringComparer.CurrentCultureIgnoreCase); this.files = new Dictionary<string, FTPFileInfo>(StringComparer.CurrentCultureIgnoreCase); }
internal FTPDirectoryInfo(string name, DateTime lastAccessTime, FTPClient client, FTPDirectoryInfo parent) : base(name, lastAccessTime, client, parent) { this.directories = new Dictionary <string, FTPDirectoryInfo>(StringComparer.CurrentCultureIgnoreCase); this.files = new Dictionary <string, FTPFileInfo>(StringComparer.CurrentCultureIgnoreCase); }