Filepaths
Functions to help locate data to import on disk.
- authorityspoke.io.filepaths.make_filepath(filename=None, directory=None, filepath=None, default_folder='holdings')
Create
pathlib.Pathfor a file containing XML or JSON to load as objects.- Parameters:
filename (
Optional[str]) – just the name of the file, without the directory.directory (
Optional[Path]) – just the directory, without the pathfilepath (
Optional[Path]) – a full path that just needs to be checked for validity and returneddefault_folder (
str) – a folder name to use in constructing a missing directory path
- Returns:
the path to the desired file
- authorityspoke.io.filepaths.get_directory_path(stem)
Find a data directory for importing files.