osl_dynamics.files.fetch_directory#

osl_dynamics.files.fetch_directory(subdirectory)#

Local path to a directory in osl-files, downloading any files not cached.

Parameters:
subdirectorystr

Directory within osl-files, e.g. "parcellation".

Returns:
pathpathlib.Path

Full path to the cached directory.

Raises:
FileNotFoundError

If osl-files has no files in that directory.

DownloadError

If a file is not cached and could not be downloaded.

Examples

>>> from osl_dynamics.files import fetch_directory
>>> fetch_directory("parcellation")