Esempio n. 1
0
        public FsAcl(Microsoft.Azure.Management.DataLake.Store.Models.AclStatus acl)
        {
            this.Group = acl.Group;
            this.Owner = acl.Owner;

            if (acl.Permission.HasValue)
            {
                if (acl.Permission > 777)
                {
                    throw new System.ArgumentOutOfRangeException();
                }
                if (acl.Permission < 0)
                {
                    throw new System.ArgumentOutOfRangeException();
                }

                string s = acl.Permission.Value.ToString("000");
                this.OwnerPermission = new FsPermission(int.Parse(s[0].ToString()));
                this.GroupPermission = new FsPermission(int.Parse(s[1].ToString()));
                this.OtherPermission = new FsPermission(int.Parse(s[2].ToString()));
            }

            this.Entries = new List <FsAclEntry>(acl.Entries.Count);
            foreach (string e in acl.Entries)
            {
                var acl_entry = new FsAclEntry(e);
                this.Entries.Add(acl_entry);
            }
        }
Esempio n. 2
0
 public void ModifyAclEntries(FsPath path, FsAclEntry entry)
 {
     this.RestClients.FileSystemRest.ModifyAclEntries(this.Store, path, entry);
 }
Esempio n. 3
0
        public FsAclEntry CloneWithPermission(FsPermission permission)
        {
            var new_entry = new FsAclEntry(this.Type, this.Name, permission);

            return(new_entry);
        }