public function is_file_readable_remotely_by_storedfile(stored_file $file) {
        if (!$file->get_filesize()) {
            // Files with empty size are either directories or empty.
            // We handle these virtually.
            return true;
        }

        $path = $this->get_remote_path_from_storedfile($file, false);
        if (is_readable($path)) {
            return true;
        }

        return false;
    }