Java android.os FileObserver fields, constructors, methods, implement or subclass

Example usage for Java android.os FileObserver fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.os FileObserver.

The text is from its open source code.

Subclass

android.os.FileObserver has subclasses.
Click this link to see all its subclasses.

Field

intACCESS
Event type: Data was read from a file
intMODIFY
Event type: Data was written to a file
intATTRIB
Event type: Metadata (permissions, owner, timestamp) was changed explicitly
intCLOSE_WRITE
Event type: Someone had a file or directory open for writing, and closed it
intCLOSE_NOWRITE
Event type: Someone had a file or directory open read-only, and closed it
intOPEN
Event type: A file or directory was opened
intMOVED_FROM
Event type: A file or subdirectory was moved from the monitored directory
intMOVED_TO
Event type: A file or subdirectory was moved to the monitored directory
intCREATE
Event type: A new file or subdirectory was created under the monitored directory
intDELETE
Event type: A file was deleted from the monitored directory
intDELETE_SELF
Event type: The monitored file or directory was deleted; monitoring effectively stops
intMOVE_SELF
Event type: The monitored file or directory was moved; monitoring continues
intALL_EVENTS
Event mask: All valid event types, combined

Constructor

FileObserver(String path, int mask)
Create a new file observer for a certain file or directory.
FileObserver(String path)
Equivalent to FileObserver(path, FileObserver.ALL_EVENTS).

Method

voidstartWatching()
Start watching for events.
voidstopWatching()
Stop watching for events.