Can I actually use this library to listen to a specific directory.
I tried doing
defmodule MyModule do
use GenServer
def start_link do
GenServer.start_link(__MODULE__, :ok, name: __MODULE__)
end
def init(:ok) do
Application.put_env(:fs, :path, "/my-directory")
:fs.subscribe()
{:ok, %{}}
end
def handle_info(a, b) do
IO.inspect a
{:noreply, b}
end
end
but nothing happened when I changed some files. I also tried to_charlist on the path but didnt help. The 0.91 code looks something like this: