Package org.boris.xlloop.util

Examples of org.boris.xlloop.util.FileSystemWatcher


    private Map factories = new HashMap();
    private String namespace;

    public ScriptRepository(File baseDir, String namespace) {
        this.baseDir = baseDir;
        this.watcher = new FileSystemWatcher(baseDir, this);
        this.namespace = namespace;

        // Add our specific factories
        JavaScriptFactory jsf = new JavaScriptFactory();
        factories.put("javascript", jsf);
View Full Code Here


import org.boris.xlloop.util.FileSystemWatcher;

public class FileSystemWatcherTest {
    public static void main(String[] args) throws Exception {
        FileSystemWatcher fs = new FileSystemWatcher(new File(
                "C:\\eclipse\\workspace\\org.boris.functionserver\\functions"),
                new FileSystemWatcher.Callback() {

                    public void fileAdded(File f) {
                        System.out.println("Added: " + f);
                    }

                    public void fileChanged(File f) {
                        System.out.println("Changed: " + f);
                    }

                    public void fileRemoved(File f) {
                        System.out.println("Removed: " + f);
                    }
                });

        fs.setPauseMillis(1000);
        fs.start();
    }
View Full Code Here

TOP

Related Classes of org.boris.xlloop.util.FileSystemWatcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.