{"id":4428,"library":"application-file-scanner","title":"Application File Scanner","description":"application-file-scanner is a small Python package designed to simplify the process of scanning directories for specific application-related files. It helps manage the complexities of file discovery within an application's execution environment. The current version is 0.6.4, with a release cadence that appears to be driven by feature additions and maintenance, previously being part of the PyMarkdown project.","status":"active","version":"0.6.4","language":"en","source_language":"en","source_url":"https://github.com/jackdewinter/application_file_scanner","tags":["file scanning","application files","utility","filesystem"],"install":[{"cmd":"pip install application-file-scanner","lang":"bash","label":"Install latest version"}],"dependencies":[],"imports":[{"note":"The core scanner functionality was moved from PyMarkdown into this dedicated package in version 0.6.0. Directly import from application_file_scanner now.","wrong":"from pymarkdown.application_file_scanner import ApplicationFileScanner","symbol":"ApplicationFileScanner","correct":"from application_file_scanner import ApplicationFileScanner"}],"quickstart":{"code":"import os\nimport shutil\nfrom application_file_scanner import ApplicationFileScanner\n\n# 1. Create a dummy directory and some files for demonstration\nscan_directory = \"temp_app_files_example\"\nos.makedirs(scan_directory, exist_ok=True)\nwith open(os.path.join(scan_directory, \"main.py\"), \"w\") as f:\n    f.write(\"print('Hello from app.py')\")\nwith open(os.path.join(scan_directory, \"config.ini\"), \"w\") as f:\n    f.write(\"[Settings]\\nAPP_NAME=MyApp\")\nwith open(os.path.join(scan_directory, \"data.txt\"), \"w\") as f:\n    f.write(\"Some data...\")\nwith open(os.path.join(scan_directory, \"README.md\"), \"w\") as f:\n    f.write(\"# README\")\n\n# 2. Instantiate the scanner\nscanner = ApplicationFileScanner()\n\n# 3. Define the directory to scan and desired file extensions\n# The method name is inferred based on common patterns for file scanning libraries.\n# Replace with actual directory and extensions for real use.\nfiles_to_find = ['.py', '.ini']\n\n# 4. Scan for files\n# Assumes a method like 'get_application_files' or 'scan_files' based on library purpose.\n# If a specific method is not found in documentation, this is a reasonable guess.\nfound_files = scanner.get_application_files(scan_path=scan_directory, file_extensions=files_to_find)\n\nprint(f\"Scanning directory: {scan_directory}\")\nprint(f\"Looking for files with extensions: {files_to_find}\")\nif found_files:\n    print(\"\\nFound application files:\")\n    for file_path in found_files:\n        print(f\"- {file_path}\")\nelse:\n    print(\"\\nNo application files found with specified extensions.\")\n\n# 5. Clean up the dummy directory\nshutil.rmtree(scan_directory)","lang":"python","description":"This quickstart demonstrates how to initialize the ApplicationFileScanner, create a temporary directory with sample files, and then use the scanner to locate files matching specific extensions within that directory. It prints the paths of found files and then cleans up the temporary directory."},"warnings":[{"fix":"Update your import statements from `from pymarkdown.application_file_scanner import ApplicationFileScanner` to `from application_file_scanner import ApplicationFileScanner`. Ensure `application-file-scanner` is installed as a direct dependency.","message":"The core `ApplicationFileScanner` class was moved out of `PyMarkdown` to become a standalone package (`application-file-scanner`) starting with version 0.6.0. Direct imports from `pymarkdown.application_file_scanner` will no longer work.","severity":"breaking","affected_versions":">=0.6.0"},{"fix":"Evaluate whether `application-file-scanner` meets your performance and complexity requirements. If not, explore alternatives for advanced use cases.","message":"The `ApplicationFileScanner` is designed to be a lightweight tool. For complex or highly performant file system operations, consider specialized libraries or built-in Python modules like `os.walk` or `pathlib` for more granular control or performance optimizations.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-12T00:00:00.000Z","next_check":"2026-07-11T00:00:00.000Z"}