Exemple #1
0
        public FilePermissions(string permissions)
        {
            if (permissions.Length > 9)
            {
                permissions = permissions.Substring(1, 9);
            }

            if (permissions.Length < 9)
            {
                throw new ArgumentException(string.Format("Invalid permissions string: {0}", permissions));
            }

            User  = new FilePermission(permissions.Substring(0, 3));
            Group = new FilePermission(permissions.Substring(3, 3));
            Other = new FilePermission(permissions.Substring(6, 3));
        }
 public FilePermissions( FilePermission user, FilePermission group, FilePermission other )
 {
     User = user;
     Group = group;
     Other = other;
 }
        public FilePermissions(string permissions )
        {
            if ( permissions.Length > 9 ) {
                permissions = permissions.Substring ( 1,9 );
            }

            if ( permissions.Length < 9 ) {
                throw new ArgumentException (string.Format("Invalid permissions string: {0}",permissions) );
            }

            User = new FilePermission ( permissions.Substring ( 0, 3 ) );
            Group = new FilePermission ( permissions.Substring ( 3, 3 ) );
            Other = new FilePermission ( permissions.Substring ( 6, 3 ) );
        }
Exemple #4
0
 public FilePermissions(FilePermission user, FilePermission group, FilePermission other)
 {
     User  = user;
     Group = group;
     Other = other;
 }