ExFSWatch

A file change watcher wrapper based on fs

System Support

Just like fs

NOTE: On Linux you need to install inotify-tools.

Usage

defmodule Monitor do
  use ExFSWatch, dirs: ["/tmp/fswatch"]

  def callback(:stop) do
    IO.puts "STOP"
  end

  def callback(file_path, events) do
    IO.inspect {file_path, events}
  end
end
iex > Monitor.start

List Events from Backend

iex > ExFSWatch.known_events

TODO