Raxol.Core.Runtime.Plugins.FileWatcherBehaviour behaviour (Raxol v0.5.0)

View Source

Behaviour defining the interface for file watching operations.

Summary

Callbacks

get_watched_files(pid)

@callback get_watched_files(pid :: pid()) :: [String.t()]

setup_file_watching(pid)

@callback setup_file_watching(pid :: pid()) :: :ok | {:error, term()}

start_link(opts)

@callback start_link(opts :: Keyword.t()) :: {:ok, pid()} | {:error, term()}

stop(pid)

@callback stop(pid :: pid()) :: :ok

unwatch_file(pid, file_path)

@callback unwatch_file(pid :: pid(), file_path :: String.t()) :: :ok | {:error, term()}

watch_file(pid, file_path, callback)

@callback watch_file(
  pid :: pid(),
  file_path :: String.t(),
  callback :: function()
) :: :ok | {:error, term()}