public void chmod(final int mask) throws IOException, InterruptedException {
        if (!isUnix() || mask == -1)   return;
        act(new Chmod(mask));
    }
@Test
    public void chmod() throws Exception {
        assumeFalse(Functions.isWindows());
        File f = temp.newFile("file");
        FilePath fp = new FilePath(f);
        int prevMode = fp.mode();
        assertEquals(0400, chmodAndMode(fp, 0400));
        assertEquals(0412, chmodAndMode(fp, 0412));
        assertEquals(0777, chmodAndMode(fp, 0777));
        assertEquals(prevMode, chmodAndMode(fp, prevMode));
    }