pyguymer3.find_instances_of_a_file

pyguymer3.find_instances_of_a_file(path, basename, /, *, allowHidden=False, debug=True, ensureNFC=True, follow_symlinks=True, return_symlinks=True)[source]

Return a recursive list of file names in a directory that match a basename.

This function returns a sorted list of desired file names recursively in a directory that match a desired basename.

Parameters:
  • path (str) – the directory to search

  • basename (str) – the desired basename

  • allowHidden (bool, optional) – allow hidden files

  • debug (bool, optional) – print debug messages

  • ensureNFC (bool, optional) – ensure that the Unicode encoding is NFC

  • follow_symlinks (bool, optional) – follow symbolic links

  • return_symlinks (bool, optional) – include symbolic links in the returned list

Returns:

ans – the sorted list of desired file names

Return type:

list of str

Notes

Copyright 2017 Thomas Guymer [1]

References