prsctrl.data.util.is_data_dir#

is_data_dir(path: Path | str) → bool[source]#

Check whether the given directory is itself a data directory.

A data directory directly contains either a HDF5 data file (.prs), a full data pickle (*_full-data.pkl or *_full-data.pkl.gz) or partial pickles (PART_*), i.e. exactly what find_all_old_data_dirs() would return it for, plus HDF5 series directories.

Parameters:

path – Path to check.

Returns:

Whether the directory is a data directory.