Example #1
0
 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;
 }
Example #2
0
 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;
 }
Example #3
0
        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;
        }
Example #4
0
        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;
        }
Example #5
0
 internal FTPFileInfo(string name, DateTime lastAccessTime, FTPClient client, FTPDirectoryInfo parent)
     : base(name, lastAccessTime, client, parent)
 {
 }
Example #6
0
 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);
 }
Example #7
0
 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);
 }
Example #8
0
 internal FTPFileInfo(string name, DateTime lastAccessTime, FTPClient client, FTPDirectoryInfo parent)
     : base(name, lastAccessTime, client, parent)
 {
 }