voici la meme recherche avec: def scandirectory(self, directory, results,…
- User
voici la meme recherche avec:
def scan_directory(self, directory, results, criteria_lower):
"""Scan the directory for files matching the criteria.""" for root, dirs, files in os.walk(directory): for file in files: fullPath = os.path.join(root, file) if not self.extension_pattern.match(fullPath): continue # Filtrer par extension self.process_file(fullPath, file, results, criteria_lower)2024-11-18 13:51:41,015 - DEBUG - End of launch_delayed_search
2024-11-18 13:51:42,029 - DEBUG - Function launchSearch start
2024-11-18 13:51:42,029 - DEBUG - Search criteria: bumper, criteria_type: filename
2024-11-18 13:51:42,030 - DEBUG - Current root path: Y:/
2024-11-18 13:51:42,030 - DEBUG - WATCHED_DIR: Y:\DocSoufiane
2024-11-18 13:51:42,030 - DEBUG - Search criteria set: bumper (type: filename)
2024-11-18 13:51:42,030 - DEBUG - Date range set: 2024-11-18 - 2024-11-18
2024-11-18 13:51:42,030 - DEBUG - Base path for search set: Y:\
2024-11-18 13:51:42,031 - DEBUG - Function launchSearch end
2024-11-18 13:51:42,031 - INFO - Starting search.
2024-11-18 13:51:42,031 - DEBUG - Root path for search: Y:\
2024-11-18 13:51:42,032 - INFO - Using file system search.
2024-11-18 13:52:00,173 - INFO - Finalizing search.
2024-11-18 13:52:00,174 - INFO - Search completed with 1561 results.
et avec :
def scan_directory(self, directory, results, criteria_lower):
"""Recursively scan the directory for files matching the criteria.""" for entry in os.scandir(directory): if entry.is_dir(): self.scan_directory(entry.path, results, criteria_lower) # Recursive call for subdirectories elif entry.is_file(): self.process_file(entry.path, entry.name, results, criteria_lower)2024-11-18 13:53:57,237 - DEBUG - Function launchSearch start
2024-11-18 13:53:57,237 - DEBUG - Search criteria: bumper, criteria_type: filename
2024-11-18 13:53:57,237 - DEBUG - Current root path: Y:/
2024-11-18 13:53:57,237 - DEBUG - WATCHED_DIR: Y:\DocSoufiane
2024-11-18 13:53:57,237 - DEBUG - Search criteria set: bumper (type: filename)
2024-11-18 13:53:57,238 - DEBUG - Date range set: 2024-11-18 - 2024-11-18
2024-11-18 13:53:57,238 - DEBUG - Base path for search set: Y:\
2024-11-18 13:53:57,238 - DEBUG - Function launchSearch end
2024-11-18 13:53:57,238 - INFO - Starting search.
2024-11-18 13:53:57,238 - DEBUG - Root path for search: Y:\
2024-11-18 13:53:57,239 - INFO - Using file system search.
- Assistant