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 ) ; }
Replaces all existing ACL entries with a new list of entries .