/** * Creates a new instance where owning user and owning group are initialized to empty strings, * and no action is permitted for any user or group. */ public AccessControlList() { mOwningUser = ""; mOwningGroup = ""; clearEntries(); }
/** * Replaces all existing ACL entries with a new list of entries. * * @param entries the new list of ACL entries * @return the updated object */ public T replaceAcl(List<AclEntry> entries) { boolean clearACL = false; for (AclEntry entry : entries) { /** * if we are only setting default ACLs, we do not need to clear access ACL entries * observed same behavior on linux */ if (!entry.isDefault()) { clearACL = true; } } if (clearACL) { mAcl.clearEntries(); } return setAcl(entries); }