Пример #1
0
        /// <summary></summary>
        /// <param name="client"></param>
        /// <param name="path"></param>
        /// <param name="name"></param>
        /// <param name="lastWrite"></param>
        /// <param name="attributes"></param>
        protected FtpItem(FtpClient client, string path, string name, DateTime lastWrite, FtpItemAttributes attributes)
        {
            this.client = client ?? throw new ArgumentNullException(nameof(client));

            var p = name.LastIndexOf('/');

            this.name = p == -1 ? name : name.Substring(p + 1);
            if (path != null)
            {
                relativePath = path + '/' + name;
            }
            else
            {
                relativePath = name;
            }

            this.lastWrite  = lastWrite;
            this.attributes = attributes;
        }         // ctor
Пример #2
0
 internal FtpFile(FtpClient client, string path, string name, long size, DateTime lastWrite, FtpItemAttributes attributes)
     : base(client, path, name, lastWrite, attributes)
 {
     this.size = size;
 }         // ctor
Пример #3
0
 internal FtpDirectory(FtpClient client, string path, string name, DateTime lastWrite, FtpItemAttributes attributes)
     : base(client, path, name, lastWrite, attributes)
 {
 }         // ctor