Utilities for working with file paths., old_prefix, new_prefix, missing: Optional[bool] = None, confirm_callback: Optional[Callable] = None)[source]#

Finds missing files by changing the initial part of paths.

  • 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.


None; filenames (and missing, if given) have new data. str, new_path: str) Tuple[str, str][source]#

Finds the smallest initial section of path that was changed.

  • old_path – Old path

  • new_path – New path


(initial part of old path), (corresponding replacement in new path)[source]#

Given a list of filenames, returns list of whether file exists.