How kuankuan2007/do-folder works
doFolder is a Python filesystem-management library with a CLI for comparison, synchronization, and hashing. The main user workflow is to select paths, wrap them as file or directory objects, then inspect differences or calculate hashes; comparison can also apply a sync plan. The graph includes filesystem operations, hash caching/calculation, and CLI dispatch. Some feature links come from README documentation because their implementation was not sampled; uncertain wiring is omitted.
Main entry points: compare.py Compare and Sync CLI · hash.py Hash CLI · tools.py Item Factory · scripts.py CLI Entrypoints
Components 16
Python Filesystem API
- Package API
src/doFolder/__init__.py - File and Directory
src/doFolder/fileSystem/classes.py - Item Factory
src/doFolder/fileSystem/tools.py
Comparison and Sync
- Compare Engine
src/doFolder/compare.py - Compare and Sync CLI
src/doFolder/cli/compare.py
Hashing
- Hash Calculators
src/doFolder/hashing/calculator.py - Hash Calculation
src/doFolder/hashing/calculate.py - Hash Cache
src/doFolder/hashing/cache.py - Hash Executor
src/doFolder/hashing/executor.py
Command Line
- Hash CLI
src/doFolder/cli/hash.py - Unified CLI
src/doFolder/cli/main.py - CLI Entrypoints
src/doFolder/scripts.py - Module Entrypoint
src/doFolder/__main__.py
Other components
- Developer
- CLI User
- Local Filesystem
Connections 25
- Developer → Package API: uses objects
- Package API → File and Directory: exposes
- File and Directory → Item Factory: creates items
- Item Factory → Local Filesystem: inspects paths
- File and Directory → Local Filesystem: reads and modifies
- Developer → Compare Engine: compares paths
- Compare Engine → Item Factory: wraps paths
- Compare Engine → Local Filesystem: reads item data
- CLI User → CLI Entrypoints: runs commands
- CLI Entrypoints → Unified CLI: dispatches unified
- CLI Entrypoints → Compare and Sync CLI: runs compare
- CLI Entrypoints → Hash CLI: runs hash
- Module Entrypoint → Unified CLI: starts CLI
- Unified CLI → Compare and Sync CLI: dispatches compare
- Unified CLI → Hash CLI: dispatches hash
- Compare and Sync CLI → Compare Engine: finds differences
- Compare and Sync CLI → Item Factory: wraps sync paths
- Compare and Sync CLI → Local Filesystem: copies sync items
- Hash CLI → Item Factory: wraps input paths
- Hash CLI → Hash Calculators: requests hashes
- Hash Calculators → Hash Cache: checks and stores
- Hash Calculators → Hash Calculation: calculates misses
- Hash Calculation → Local Filesystem: reads file content
- Hash CLI → Hash Executor: uses threaded hashing
- Hash Executor → Hash Calculators: submits calculations