fsspec/core.py
def open_local(url, mode="rb", **storage_options):
    """Open file(s) which can be resolved to local

    For files which either are local, or get downloaded upon open
    (e.g., by file caching)

    Parameters
    ----------
    url: str or list(str)
    mode: str
        Must be read mode
    storage_options:
        passed on to FS for or used by open_files (e.g., compression)
    """
    if "r" not in mode:
        raise ValueError("Can only ensure local files when reading")
    of = open_files(url, mode=mode, **storage_options)
    if not getattr(of[0].fs, "local_file", False):
        raise ValueError(
            "open_local can only be used on a filesystem which"
            " has attribute local_file=True"
        )
    with of as files:
        paths = [f.name for f in files]
    if isinstance(url, str) and not has_magic(url):
        return paths[0]
    return paths
Open file(s) which can be resolved to local

    For files which either are local, or get downloaded upon open
    (e.g., by file caching)

    Parameters
    ----------
    url: str or list(str)
    mode: str
        Must be read mode
    storage_options:
        passed on to FS for or used by open_files (e.g., compression)
    
Open file(s) which can be resolved to local
For files which either are local, or get downloaded upon open

Parameters

str or list(str)
mode: str
Must be read mode
storage_options:
passed on to FS for or used by open_files
Open file ( s ) which can be resolved to local For files which either are local or get downloaded upon open Parameters str or list ( str ) mode : str Must be read mode storage_options : passed on to FS for or used by open_files
def open_local(url, mode="rb", **storage_options):
    if "r" not in mode:
        raise ValueError("Can only ensure local files when reading")
    of = open_files(url, mode=mode, **storage_options)
    if not getattr(of[0].fs, "local_file", False):
        raise ValueError(
            "open_local can only be used on a filesystem which"
            " has attribute local_file=True"
        )
    with of as files:
        paths = [f.name for f in files]
    if isinstance(url, str) and not has_magic(url):
        return paths[0]
    return paths
def open_local ( url , mode = "rb" , ** storage_options ) : if "r" not in mode : raise ValueError ( "Can only ensure local files when reading" ) of = open_files ( url , mode = mode , ** storage_options ) if not getattr ( of [ 0 ] . fs , "local_file" , False ) : raise ValueError ( "open_local can only be used on a filesystem which" " has attribute local_file=True" ) with of as files : paths = [ f . name for f in files ] if isinstance ( url , str ) and not has_magic ( url ) : return paths [ 0 ] return paths
Open file(s) which can be resolved to local
For files which either are local, or get downloaded upon open
(e.g., by file caching)
Open file ( s ) which can be resolved to local For files which either are local or get downloaded upon open ( e . g . by file caching )
"""Open file(s) which can be resolved to local

    For files which either are local, or get downloaded upon open
    (e.g., by file caching)

    Parameters
    ----------
    url: str or list(str)
    mode: str
        Must be read mode
    storage_options:
        passed on to FS for or used by open_files (e.g., compression)
    """
url
mode