FileDocCategorySizeDatePackage
FileObserver.javaAPI DocAndroid 1.5 API4571Wed May 06 22:41:56 BST 2009android.os

FileObserver

public abstract class FileObserver extends Object

Fields Summary
public static final int
ACCESS
public static final int
MODIFY
public static final int
ATTRIB
public static final int
CLOSE_WRITE
public static final int
CLOSE_NOWRITE
public static final int
OPEN
public static final int
MOVED_FROM
public static final int
MOVED_TO
public static final int
CREATE
public static final int
DELETE
public static final int
DELETE_SELF
public static final int
MOVE_SELF
public static final int
ALL_EVENTS
private static final String
LOG_TAG
private static ObserverThread
s_observerThread
private String
m_path
private Integer
m_descriptor
private int
m_mask
Constructors Summary
public FileObserver(String path)

	this(path, ALL_EVENTS);
    
public FileObserver(String path, int mask)

	m_path = path;
	m_mask = mask;
	m_descriptor = -1;
    
Methods Summary
protected voidfinalize()

	stopWatching();
    
public abstract voidonEvent(int event, java.lang.String path)

public voidstartWatching()

	if (m_descriptor < 0) {
	    m_descriptor = s_observerThread.startWatching(m_path, m_mask, this);
	}
    
public voidstopWatching()

	if (m_descriptor >= 0) {
	    s_observerThread.stopWatching(m_descriptor);
	    m_descriptor = -1;
	}