public void setRight(FileAccessor accessor, FileRight right, boolean set) {

        int index = 0;
        if (right == FileRight.READ) {
            index = 0;
        } else if (right == FileRight.WRITE) {
            index = 1;
        } else if (right == FileRight.DELETE) {
            index = 2;
        } else if (right == FileRight.EXECUTE) {
            index = 3;
        } else if (right == FileRight.EXECUTE_EXTENDED) {
            index = 3;
        }

        getRightArray(accessor)[index] = set ? right : null;
    }