Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

treespy

Simplified, zero dependency recursive directory watching API for Java SE 7+

Watch a directory recursively

    TreeSpy spy = SpyFactory.getSpy();
    
    String directory = "/home/wfaithfull"
	
	File home = new File(directory);
	
	spy.watchRecursive(home, (changedFile, eventType) -> {
		System.out.println(String.format("File %s changed", changedFile));
	});

Watch a directory recursively with a glob pattern

	TreeSpy spy = SpyFactory.getSpy();
    
    String directory = "/home/wfaithfull"
	
	File home = new File(directory);
	
	spy.watchRecursive(home, (changedFile, eventType) -> {
		System.out.println(String.format("File %s changed", changedFile));
	}, "glob:*.java", "glob:*.txt");

About

Simplified, zero dependency directory watching API for Java

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages