Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ayancey/dirmon
Cross-platform library to poll directories for changes (added/removed)
https://github.com/ayancey/dirmon
Last synced: 9 days ago
JSON representation
Cross-platform library to poll directories for changes (added/removed)
- Host: GitHub
- URL: https://github.com/ayancey/dirmon
- Owner: ayancey
- Created: 2015-02-03T21:07:34.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-02-23T04:47:47.000Z (over 9 years ago)
- Last Synced: 2024-07-31T19:16:04.732Z (3 months ago)
- Language: Python
- Size: 176 KB
- Stars: 71
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- my-awesome-starred - dirmon - Cross-platform library to poll directories for changes (added/removed) (Python)
- starred-awesome - dirmon - Cross-platform library to poll directories for changes (added/removed) (Python)
README
# dirmon
Barebones cross-platform library for detecting files added and removed from a directory.# Example
```python
from dirmon import DirectoryMonitor# Class DirectoryMonitor("PATH", SCAN INTERVAL [in seconds])
monitor = DirectoryMonitor(".", 5)def added(file):
print('Added: ' + file)
if file == ".git":
print("Git initiated")
monitor.stop()def removed(file):
print('Removed: ' + file)monitor.on_added = added
monitor.on_removed = removed
monitor.start()
```