public boolean match(FileAttribute attr) {

        // check for errors first
        if (attr == null || name_ == null) {
            return false;
        }

        // check based on the file name
        if (attr.getName().startsWith(name_)) {
            return true;
        } else {
            return false;
        }
    }