Reloader for Erlang source files

A simple module to detect changes and load Erlang source files instantly in the VM without the need to restart the VM.

The power of the Erlang Virtual Machine allows to load into the running application a new version of a module while the application is running. This speeds the development process because the developer doesn't have to stop the application, compile it and start it again.

Usage: Simply drop reloader.erl in your source directory and compile it with the rest of your application. Then, start the reloader by typing in the Erlang console:

reloader:start().

or

reloader:start(Options).

where Options is a list of {key, value}. The currently supported ones are:

{interval, IntervalInMilliseconds}

with a default of 5000 ms and:

{paths, ListOfRelativePaths}

where each path is relative to the current execution directory.

The path is expected to be string. The default path is "../src".

If we use reloader:start/0, the default values for the options will be used unless the declarations are changed in the source code.

Examples of starting reloader:

reloader:start(). % will use the default values

reloader:start([{interval, 1000}]). % will check for changes every second

reloader:start([{paths, ["../lib/somelib/src", "../src". % will monitor extra directories with source files

To stop the reloader:

reloader:stop().