def _fileOpen(fileModel, file):
    """
    Open a file using the local file path if possible, since that will be more
    efficient than opening it through some assetstores.

    :param fileModel: the Girder file model instance.
    :param file: file document.
    :return: A file-like object containing the bytes of the file.
    """
    try:
        return open(fileModel.getLocalFilePath(file), 'rb')
    except Exception:
        return fileModel.open(file, 'rb')