Skip to content
Snippets Groups Projects
Commit a06054e9 authored by falood's avatar falood
Browse files

README example bugfix

parent 7eebbfc7
No related branches found
No related tags found
No related merge requests found
...@@ -75,12 +75,12 @@ defmodule Watcher do ...@@ -75,12 +75,12 @@ defmodule Watcher do
{:ok, %{watcher_pid: watcher_pid}} {:ok, %{watcher_pid: watcher_pid}}
end end
def handle_info({:file_event, ^watcher_pid, {path, events}}, %{watcher_pid: watcher_pid}=state) do def handle_info({:file_event, watcher_pid, {path, events}}, %{watcher_pid: watcher_pid}=state) do
# YOUR OWN LOGIC FOR PATH AND EVENTS # YOUR OWN LOGIC FOR PATH AND EVENTS
{:noreply, state} {:noreply, state}
end end
def handle_info({:file_event, ^watcher_pid, :stop}, %{watcher_pid: watcher_pid}=state) do def handle_info({:file_event, watcher_pid, :stop}, %{watcher_pid: watcher_pid}=state) do
# YOUR OWN LOGIC WHEN MONITOR STOP # YOUR OWN LOGIC WHEN MONITOR STOP
{:noreply, state} {:noreply, state}
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment