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