Ejemplo n.º 1
0
 public OS9FileInfo(string name, int size, OS9FileAttributes attributes, Timestamp createdTime, Timestamp modifiedTime, int owner, int links, OS9FileSegment[] segments)
 {
     Name         = name;
     Size         = size;
     Attributes   = attributes;
     CreateTime   = createdTime;
     ModifiedTime = modifiedTime;
     OwnerId      = owner;
     LinkCount    = links;
     Segments     = segments;
 }
Ejemplo n.º 2
0
 public OS9FileInfo(string name, int size, OS9FileAttributes attributes, Timestamp createdTime, Timestamp modifiedTime, int owner, int links, OS9FileSegment[] segments)
 {
     Name = name;
     Size = size;
     Attributes = attributes;
     CreateTime = createdTime;
     ModifiedTime = modifiedTime;
     OwnerId = owner;
     LinkCount = links;
     Segments = segments;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Convert an OS9FileAttributes object to a compact string representation.
 /// </summary>
 /// <param name="attributes">File attribute.</param>
 /// <returns>String representation.</returns>
 public static string AttributeToString(OS9FileAttributes attributes)
 {
     var attrs = new char[8];
     attrs[0] = (attributes & OS9FileAttributes.Directory) != 0 ? 'd' : '-';
     attrs[1] = (attributes & OS9FileAttributes.Shared) != 0 ? 's' : '-';
     attrs[2] = (attributes & OS9FileAttributes.PublicExecute) != 0 ? 'x' : '-';
     attrs[3] = (attributes & OS9FileAttributes.PublicWrite) != 0 ? 'w' : '-';
     attrs[4] = (attributes & OS9FileAttributes.PublicRead) != 0 ? 'r' : '-';
     attrs[5] = (attributes & OS9FileAttributes.Execute) != 0 ? 'x' : '-';
     attrs[6] = (attributes & OS9FileAttributes.Write) != 0 ? 'w' : '-';
     attrs[7] = (attributes & OS9FileAttributes.Read) != 0 ? 'r' : '-';
     return new string(attrs);
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Convert an OS9FileAttributes object to a compact string representation.
        /// </summary>
        /// <param name="attributes">File attribute.</param>
        /// <returns>String representation.</returns>
        public static string AttributeToString(OS9FileAttributes attributes)
        {
            var attrs = new char[8];

            attrs[0] = (attributes & OS9FileAttributes.Directory) != 0 ? 'd' : '-';
            attrs[1] = (attributes & OS9FileAttributes.Shared) != 0 ? 's' : '-';
            attrs[2] = (attributes & OS9FileAttributes.PublicExecute) != 0 ? 'x' : '-';
            attrs[3] = (attributes & OS9FileAttributes.PublicWrite) != 0 ? 'w' : '-';
            attrs[4] = (attributes & OS9FileAttributes.PublicRead) != 0 ? 'r' : '-';
            attrs[5] = (attributes & OS9FileAttributes.Execute) != 0 ? 'x' : '-';
            attrs[6] = (attributes & OS9FileAttributes.Write) != 0 ? 'w' : '-';
            attrs[7] = (attributes & OS9FileAttributes.Read) != 0 ? 'r' : '-';
            return(new string(attrs));
        }