How reandri-1/winautosort works
WinAutoSort is a Windows background file router. Its main workflow loads configuration, acquires a per-folder single-instance guard, watches a directory (and optionally sweeps existing files), filters and queues candidates, checks download readiness, selects a category, then performs a non-overwriting move; it logs activity throughout. The map reflects the sampled caller relationships and README-described behavior. Supporting Windows helpers, logger details, and documented features are included; edges without direct source or README evidence are omitted.
Main entry points: watcher.go Directory Watcher · main.go App Entrypoint · mover.go Safe File Mover · config.go Config Rules
Components 15
Startup & Config
- App Entrypoint
main.go - Config Rules
config.go
Watch & Dispatch
- Directory Watcher
watcher.go - Job Queue
watcher.go
Readiness & Routing
- Download Readiness
lock_windows.go - Category Selection
config.go - Safe File Mover
mover.go
Windows & Logging
- Instance Guard
winutil_windows.go - Windows Atomic Move
winutil_windows.go - Rotating Log
logger.go - Setup Dialogs
winutil_windows.go
Other components
- User
- Windows File Events
- JSON Config
config.json - Category Folders
Connections 15
- User → App Entrypoint: starts
README.md - App Entrypoint → Config Rules: loads
main.go - JSON Config → Config Rules: configures
README.md - App Entrypoint → Setup Dialogs: prompts
main.go - App Entrypoint → Instance Guard: acquires guard
main.go - App Entrypoint → Directory Watcher: creates and runs
main.go - Directory Watcher → Windows File Events: receives events
README.md - Directory Watcher → Job Queue: dispatches jobs
watcher.go - Directory Watcher → Config Rules: filters and classifies
watcher.go - Directory Watcher → Download Readiness: checks files
watcher.go - Directory Watcher → Safe File Mover: moves ready files
watcher.go - Safe File Mover → Windows Atomic Move: attempts atomic rename
README.md - Safe File Mover → Category Folders: routes files
- App Entrypoint → Rotating Log: sets up logging
main.go - Directory Watcher → Rotating Log: records activity