FtpDateToString() public static method

public static FtpDateToString ( System.DateTime date ) : String
date System.DateTime
return String
示例#1
0
        public override String ToString()
        {
            Char[] lRights = new Char[] { 'd', 'r', 'w', 'x', 'r', 'w', 'x', 'r', 'w', 'x' };

            if (!this.Directory)
            {
                lRights[0] = '-';
            }

            if (!this.UserRead)
            {
                lRights[1] = '-';
            }

            if (!this.UserWrite)
            {
                lRights[2] = '-';
            }

            if (!this.UserExec)
            {
                lRights[3] = '-';
            }

            if (!this.GroupRead)
            {
                lRights[4] = '-';
            }

            if (!this.GroupWrite)
            {
                lRights[5] = '-';
            }

            if (!this.GroupExec)
            {
                lRights[6] = '-';
            }

            if (!this.OtherRead)
            {
                lRights[7] = '-';
            }

            if (!this.OtherWrite)
            {
                lRights[8] = '-';
            }

            if (!this.OtherExec)
            {
                lRights[9] = '-';
            }

            return(String.Format("{0} {1,3} {2,8} {3,8} {4,7} {5} {6}", new String(lRights), this.SubItemCount, this.User,
                                 this.Group, this.Size, FtpListingItem.FtpDateToString(this.FileDate), this.FileName));
        }