uataq.filesystem.core.list_files#
- uataq.filesystem.core.list_files(path='.', pattern=None, ignore_case=False, all_files=False, full_names=False, recursive=False, followlinks=False)[source]#
Return a list of files in the specified directory that match the specified pattern.
- Parameters:
path (
str|Path) – The directory to search for files. Defaults to the current directory.pattern (
str|None) – The glob-style pattern to match against file names. Defaults to None, which matches all files.ignore_case (
bool) – Whether to ignore case when matching file names. Defaults to False.all_files (
bool) – Whether to include hidden files (files that start with a dot). Defaults to False.full_names (
bool) – Whether to return the full path of each file. Defaults to False.recursive (
bool) – Whether to search for files recursively in subdirectories. Defaults to False.followlinks (
bool) – Whether to follow symbolic links. Defaults to False.
- Returns:
A list of file names or full paths that match the specified pattern.
- Return type: