sdf_xarray.resolve_paths#
- sdf_xarray.resolve_paths(file_pattern)[source]#
Resolve user input into sorted absolute paths to existing SDF files.
This helper is used by
sdf_xarray.open_mfdataset()andsdf_xarray.open_mfdatatree()in order to decide which files to open.- Parameters:
file_pattern (
str|PathLike|Iterable[str|PathLike]) –Any of the following:
Directory path: load all
*.sdffiles in that directory.Glob-like path: load all files matching the pattern (for example,
normal_*.sdf).List of exact paths: load only the provided files (for example,
["0000.sdf", "0010.sdf"]).
- Returns:
Numerically sorted absolute paths to files that exist and have the
.sdfextension.- Return type:
list[Path]- Raises:
FileNotFoundError – If no paths match, any resolved path is not a file, or any file does not have the
.sdfextension.