Lines Matching refs:suffix
201 suffix=None,
206 If "suffix" is provided then only files with that suffix will
209 if suffix and not isinstance(suffix, str):
210 raise ValueError('suffix must be a string')
213 if suffix and not filename.endswith(suffix):
219 suffix=None,
224 If "suffix" is provided then only files with that suffix will
227 suffix = suffix or ''
228 if not isinstance(suffix, str):
229 raise ValueError('suffix must be a string')
231 for filename in _glob(f'{root}/*{suffix}'):
233 for filename in _glob(f'{root}/**/*{suffix}'):
237 def iter_files(root, suffix=None, relparent=None, *,
247 If "suffix" is provided then only files with that suffix will
256 yield from iter_files(root, suffix, relparent,
268 # Handle a single suffix.
269 if suffix and not isinstance(suffix, str):
271 suffix = tuple(suffix)
273 filenames = get_files(root, suffix=suffix)
274 suffix = None
277 if suffix and not isinstance(suffix, str): # multiple suffixes
278 if not filename.endswith(suffix):
291 Unlike iter_files(), the results are in the original suffix order.
296 for suffix in suffixes:
297 yield from _iter_files(root, suffix, relparent)