protected function file_is_indexable($file) {
        if (!empty($this->config->maxindexfilekb) && ($file->get_filesize() > ($this->config->maxindexfilekb * 1024))) {
            // The file is too big to index.
            return false;
        }

        $mime = $file->get_mimetype();

        if ($mime == 'application/vnd.moodle.backup') {
            // We don't index Moodle backup files. There is nothing usefully indexable in them.
            return false;
        }

        return true;
    }
protected function file_is_indexable($file) {
        if (!empty($this->config->maxindexfilekb) && ($file->get_filesize() > ($this->config->maxindexfilekb * 1024))) {
            // The file is too big to index.
            return false;
        }

        $mime = $file->get_mimetype();

        if ($mime == 'application/vnd.moodle.backup') {
            // We don't index Moodle backup files. There is nothing usefully indexable in them.
            return false;
        }

        return true;
    }
protected function file_is_indexable ( $ file ) { if ( ! empty ( $ this -> config -> maxindexfilekb ) && ( $ file -> get_filesize ( ) > ( $ this -> config -> maxindexfilekb * 1024 ) ) ) { // The file is too big to index. return false ; } $ mime = $ file -> get_mimetype ( ) ; if ( $ mime == 'application/vnd.moodle.backup' ) { // We don't index Moodle backup files. There is nothing usefully indexable in them. return false ; } return true ; }
Checks to see if a passed file is indexable.

@param \stored_file $file The file to check
@return bool True if the file can be indexed
Checks to see if a passed file is indexable .