public function accept()
    {
        $candidate = $this->getInnerIterator()->current();

        // Check that the candidate file (a full file path) ends in the pattern we are searching for.
        return strrpos($candidate, $this->file) === strlen($candidate) - strlen($this->file);
    }