文件名称:dirmon:用于轮询目录更改的跨平台库(已添加删除)
文件大小:2KB
文件格式:ZIP
更新时间:2024-07-12 20:04:10
Python
迪尔蒙 Barebones 跨平台库,用于检测从目录中添加和删除的文件。 例子 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 = remo
【文件预览】:
dirmon-master
----setup.py(362B)
----.gitignore(682B)
----__init__.py(0B)
----example.py(355B)
----README.md(479B)
----dirmon.py(823B)