FileObserver

Class of android.os · FileObserver.java · Android's reference

public abstract class FileObserver

Tells of changes to a file or the files of a folder, through the host's file watch service. The host tells of creates, deletes and changes, so only CREATE, DELETE and MODIFY events come.

Fields

public static final int ACCESS = 0x1 source
public static final int MODIFY = 0x2 source
public static final int ATTRIB = 0x4 source
public static final int CLOSE_WRITE = 0x8 source
public static final int CLOSE_NOWRITE = 0x10 source
public static final int OPEN = 0x20 source
public static final int MOVED_FROM = 0x40 source
public static final int MOVED_TO = 0x80 source
public static final int CREATE = 0x100 source
public static final int DELETE = 0x200 source
public static final int DELETE_SELF = 0x400 source
public static final int MOVE_SELF = 0x800 source
public static final int ALL_EVENTS = 0xfff source

Constructors

public FileObserver(String path) deprecated source
public FileObserver(String path, int mask) deprecated source
public FileObserver(File file) source
public FileObserver(File file, int mask) source

Methods

public abstract void onEvent(int event, String path) source
public synchronized void startWatching() source
public synchronized void stopWatching() source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.