Skip to content
/ dirmon Public

Cross-platform library to poll directories for changes (added/removed)

Notifications You must be signed in to change notification settings

ayancey/dirmon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dirmon

Barebones cross-platform library for detecting files added and removed from a directory.

Example

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()

About

Cross-platform library to poll directories for changes (added/removed)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages