sleap.io.pathutils#
Utilities for working with file paths.
- sleap.io.pathutils.filenames_prefix_change(filenames, old_prefix, new_prefix, missing: Optional[bool] = None, confirm_callback: Optional[Callable] = None)[source]#
Finds missing files by changing the initial part of paths.
- Parameters:
filenames – The list of filenames, needn’t all be missing.
old_prefix – Initial part of path to replace.
new_prefix – Initial part with which to replace it.
missing – List of which files are known to be missing; if not given, then we’ll check each file.
confirm_callback – If given, then we’ll call this before applying change to confirm that user wants to apply the change.
- Returns:
None;
filenames
(andmissing
, if given) have new data.