com.sun.jna.examples
Class FileMonitor
java.lang.Object
com.sun.jna.examples.FileMonitor
public abstract class FileMonitor
- extends java.lang.Object
Provides notification of file system changes. Actual capabilities may
vary slightly by platform.
Watched files which are removed from the filesystem are no longer watched.
- Author:
- twall
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FILE_CREATED
public static final int FILE_CREATED
- See Also:
- Constant Field Values
FILE_DELETED
public static final int FILE_DELETED
- See Also:
- Constant Field Values
FILE_MODIFIED
public static final int FILE_MODIFIED
- See Also:
- Constant Field Values
FILE_ACCESSED
public static final int FILE_ACCESSED
- See Also:
- Constant Field Values
FILE_NAME_CHANGED_OLD
public static final int FILE_NAME_CHANGED_OLD
- See Also:
- Constant Field Values
FILE_NAME_CHANGED_NEW
public static final int FILE_NAME_CHANGED_NEW
- See Also:
- Constant Field Values
FILE_RENAMED
public static final int FILE_RENAMED
- See Also:
- Constant Field Values
FILE_SIZE_CHANGED
public static final int FILE_SIZE_CHANGED
- See Also:
- Constant Field Values
FILE_ATTRIBUTES_CHANGED
public static final int FILE_ATTRIBUTES_CHANGED
- See Also:
- Constant Field Values
FILE_SECURITY_CHANGED
public static final int FILE_SECURITY_CHANGED
- See Also:
- Constant Field Values
FILE_ANY
public static final int FILE_ANY
- See Also:
- Constant Field Values
FileMonitor
public FileMonitor()
watch
protected abstract void watch(java.io.File file,
int mask,
boolean recursive)
throws java.io.IOException
- Throws:
java.io.IOException
unwatch
protected abstract void unwatch(java.io.File file)
dispose
protected abstract void dispose()
addWatch
public void addWatch(java.io.File dir)
throws java.io.IOException
- Throws:
java.io.IOException
addWatch
public void addWatch(java.io.File dir,
int mask)
throws java.io.IOException
- Throws:
java.io.IOException
addWatch
public void addWatch(java.io.File dir,
int mask,
boolean recursive)
throws java.io.IOException
- Throws:
java.io.IOException
removeWatch
public void removeWatch(java.io.File file)
notify
protected void notify(FileMonitor.FileEvent e)
addFileListener
public void addFileListener(FileMonitor.FileListener x)
removeFileListener
public void removeFileListener(FileMonitor.FileListener x)
finalize
protected void finalize()
- Overrides:
finalize
in class java.lang.Object
getInstance
public static FileMonitor getInstance()
Copyright © 2007 Timothy Wall. All Rights Reserved.