Module zotonic_filewatcher_fswatch

Watch for changed files using fswatch (MacOS X; brew install fswatch).

Copyright © 2014-2018 Arjan Scherpenisse <arjan@scherpenisse.net>

Behaviours: gen_server.

Authors: Arjan Scherpenisse (arjan@scherpenisse.net).

Description

Watch for changed files using fswatch (MacOS X; brew install fswatch). https://github.com/emcrisostomo/fswatch

Function Index

code_change/3Convert process state when code is changed.
handle_call/3Trap unknown calls.
handle_cast/2
handle_info/2Reading a line from the fswatch program.
init/1Initiates the server.
is_installed/0
restart/0
start_link/0Starts the server.
terminate/2This function is called by a gen_server when it is about to terminate.

Function Details

code_change/3

code_change(OldVsn, State, Extra) -> {ok, NewState}

Convert process state when code is changed

handle_call/3

handle_call(Message, From, State) -> any()

Trap unknown calls

handle_cast/2

handle_cast(Message::Msg, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}

handle_info/2

handle_info(Info, State) -> any()

Reading a line from the fswatch program.

init/1

init(X1::Args) -> {ok, State} | {ok, State, Timeout} | ignore | {stop, Reason}

Initiates the server.

is_installed/0

is_installed() -> boolean()

restart/0

restart() -> ok

start_link/0

start_link() -> {ok, pid()} | ignore | {error, term()}

Starts the server

terminate/2

terminate(Reason, State) -> void()

This function is called by a gen_server when it is about to terminate. It should be the opposite of Module:init/1 and do any necessary cleaning up. When it returns, the gen_server terminates with Reason. The return value is ignored.


Generated by EDoc