public function is_available() {
        global $CFG;
        $preventfilelocking = !empty($CFG->preventfilelocking);
        $lockdirisdataroot = true;
        if (!empty($CFG->file_lock_root) && strpos($CFG->file_lock_root, $CFG->dataroot) !== 0) {
            $lockdirisdataroot = false;
        }
        return !$preventfilelocking || !$lockdirisdataroot;
    }