Google berkomitmen untuk mendorong terwujudnya keadilan ras bagi komunitas Kulit Hitam. Lihat caranya.
Tetap teratur dengan koleksi Simpan dan kategorikan konten berdasarkan preferensi Anda.

FileIdleMonitor

public class FileIdleMonitor
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.FileIdleMonitor


Monitors files and executes a callback if they have been idle (i.e. none of them have been modified) for too long.

Summary

Public constructors

FileIdleMonitor(Duration timeout, Runnable callback, File... files)

Constructs a file monitor with a default executor.

Public methods

void start()

Starts monitoring files.

void stop()

Stops monitoring files.

Public constructors

FileIdleMonitor

public FileIdleMonitor (Duration timeout, 
                Runnable callback, 
                File... files)

Constructs a file monitor with a default executor.

Parameters
timeout Duration: maximum idle time

callback Runnable: callback to execute if idle for too long

files File: files to monitor

Public methods

start

public void start ()

Starts monitoring files. No-op if already started.

stop

public void stop ()

Stops monitoring files. No-op if already stopped.