This module provides a function to retrieve information about files in a given folder and its subfolders.
The function get_folder_file_complete_path takes one or more folder paths as input and returns a list of named tuples.
Each named tuple contains information about a file found in the folder and its subfolders, including the folder path,
file name, complete file path, and file extension.
Example usage:
folders = [r'C:\cygwin', r'C:/cygwinx']
file_info_list = get_folder_file_complete_path(folders)
for file_info in file_info_list:
print(file_info.path)
Note: This function only works for local file systems and does not support remote file systems.
Args:
folders: A string or a list of strings representing folder paths to retrieve file information from.
maxsubfolders: An optional integer that limits the maximum number of subfolders to search in each folder.
Returns:
A list of named tuples. Each named tuple contains information about a file found in the folder and its subfolders,
including the folder path, file name, complete file path, and file extension.
Raises:
ValueError: If the input folder path is invalid or does not exist.
TypeError: If the input folders argument is not a string or a list of strings.
The Tidelift Subscription provides access to a continuously curated stream of human-researched and maintainer-verified data on open source packages and their licenses, releases, vulnerabilities, and development practices.