get_filepaths_with_extension

documenteer.sphinxconfig.utils.get_filepaths_with_extension(extname, root_dir='.')

Get relative filepaths of files in a directory, and sub-directories, with the given extension.

Parameters
  • extname (str) – Extension name (e.g. ‘txt’, ‘rst’). Extension comparison is case-insensitive.

  • root_dir (str, optional) – Root directory. Current working directory by default.

Returns

filepaths – File paths, relative to root_dir, with the given extension.

Return type

list of str