Example usage for android.os FileObserver OPEN

List of usage examples for android.os FileObserver OPEN

Introduction

In this page you can find the example usage for android.os FileObserver OPEN.

Prototype

int OPEN

To view the source code for android.os FileObserver OPEN.

Click Source Link

Document

Event type: A file or directory was opened

Usage

From source file:org.ado.minesync.minecraft.MinecraftWorldObserver.java

private String getFileAction(int event) {
    String fileAction = null;//from  w w  w.  ja va2 s.c om
    switch (event) {
    case FileObserver.ACCESS:
        fileAction = "ACCESS";
        break;
    case FileObserver.ALL_EVENTS:
        fileAction = "ALL_EVENTS";
        break;
    case FileObserver.ATTRIB:
        fileAction = "ATTRIB";
        break;
    case FileObserver.CLOSE_NOWRITE:
        fileAction = "CLOSE_NOWRITE";
        break;
    case FileObserver.CLOSE_WRITE:
        fileAction = "CLOSE_WRITE";
        break;
    case FileObserver.CREATE:
        fileAction = "CREATE";
        break;
    case FileObserver.DELETE:
        fileAction = "DELETE";
        break;
    case FileObserver.DELETE_SELF:
        fileAction = "DELETE_SELF";
        break;
    case FileObserver.MODIFY:
        fileAction = "MODIFY";
        break;
    case FileObserver.MOVE_SELF:
        fileAction = "MOVE_SELF";
        break;
    case FileObserver.MOVED_FROM:
        fileAction = "MOVED_FROM";
        break;
    case FileObserver.MOVED_TO:
        fileAction = "MOVED_TO";
        break;
    case FileObserver.OPEN:
        fileAction = "OPEN";
        break;
    }
    return fileAction;
}