public function can_convert_storedfile_to(stored_file $file, $to) {
        if ($file->is_directory()) {
            // Directories cannot be converted.
            return false;
        }

        if (!$file->get_filesize()) {
            // Empty files cannot be converted.
            return false;
        }

        $from = pathinfo($file->get_filename(), PATHINFO_EXTENSION);
        if (!$from) {
            // No file extension could be found. Unable to determine converter.
            return false;
        }

        return $this->can_convert_format_to($from, $to);
    }