@Test public void setOtherBits() { Mode mode = new Mode((short) 0000); mode.setOtherBits(Mode.Bits.READ_EXECUTE); assertEquals(Mode.Bits.READ_EXECUTE, mode.getOtherBits()); mode.setOtherBits(Mode.Bits.WRITE); assertEquals(Mode.Bits.WRITE, mode.getOtherBits()); mode.setOtherBits(Mode.Bits.ALL); assertEquals(Mode.Bits.ALL, mode.getOtherBits()); } }
case OTHER: Mode modeOther = new Mode(mMode); modeOther.setOtherBits(Mode.Bits.NONE); if (mAccessAcl != null) { modeOther.setOtherBits(new Mode(mAccessAcl.mMode).getOtherBits());
/** * Applies the given umask {@link Mode} to this mode. * * @param mode the mode to update * @param umask the umask to apply * @return the updated object */ private static Mode applyUMask(Mode mode, Mode umask) { mode.setOwnerBits(mode.getOwnerBits().and(umask.getOwnerBits().not())); mode.setGroupBits(mode.getGroupBits().and(umask.getGroupBits().not())); mode.setOtherBits(mode.getOtherBits().and(umask.getOtherBits().not())); return mode; }
case OTHER: Mode modeOther = new Mode(mMode); modeOther.setOtherBits(entry.getActions().toModeBits()); mMode = modeOther.toShort(); return;
updateMode.setOtherBits(updateMode.getOtherBits().and(defaultMode.getOtherBits())); acl.mMode = updateMode.toShort();
Long ufsLastModified = context.getUfsStatus().getLastModifiedTime(); if (resolution.getShared()) { mode.setOtherBits(mode.getOtherBits().or(mode.getOwnerBits()));
Mode mode = new Mode(ufsMode); if (resolution.getShared()) { mode.setOtherBits(mode.getOtherBits().or(mode.getOwnerBits()));
Mode mode = new Mode(ufsMode); if (resolution.getShared()) { mode.setOtherBits(mode.getOtherBits().or(mode.getOwnerBits()));
Long ufsLastModified = ufsStatus.getLastModifiedTime(); if (resolution.getShared()) { mode.setOtherBits(mode.getOtherBits().or(mode.getOwnerBits()));