folder_extract_mt module

folder_extract_mt.list_files(directory, queue)[source]

Walks through the directory and its subdirectories to list all files. Adds each file path to the queue after encoding to handle invalid surrogate characters.

Args:

directory (str): The root directory to start listing files from. queue (Queue): The queue to put the file paths into.

folder_extract_mt.main(root_directory, output_file, num_processes)[source]

Coordinates the listing and writing of files using multiple processes.

Args:

root_directory (str): The root directory to start listing files from. output_file (str): The file to write the file paths to. num_processes (int): The number of processes to use for listing files.

folder_extract_mt.write_files(queue, output_file)[source]

Writes file paths from the queue to the output file. Stops writing when a None value is encountered in the queue.

Args:

queue (Queue): The queue to get the file paths from. output_file (str): The file to write the file paths to.