Erl2ex v0.0.9 Erl2ex.Source

Erl2ex.Source is a process that produces Erlang source, normally reading files from the file system.

Summary

Types

t()

The ProcessID of a source process

Functions

Reads the include file at the given path, given a context directory, and returns a tuple comprising the data in the file and the full path to it

Reads the include file at the given path, given a context library, and returns a tuple comprising the data in the file and the full path to it

Reads the source file at the given path or symbolic location, and returns a tuple comprising the data in the file and the full path to it

Starts a source and returns its PID

Stops the source process

Types

t :: pid

The ProcessID of a source process.

Functions

read_include(source, path, cur_dir)

Specs

read_include(t, Path.t, Path.t | nil) :: {String.t, Path.t}

Reads the include file at the given path, given a context directory, and returns a tuple comprising the data in the file and the full path to it.

read_lib_include(source, lib, path)

Specs

read_lib_include(t, atom, Path.t) :: {String.t, Path.t}

Reads the include file at the given path, given a context library, and returns a tuple comprising the data in the file and the full path to it.

read_source(source, path)

Specs

read_source(t, Erl2ex.file_id) :: {String.t, Erl2ex.file_id}

Reads the source file at the given path or symbolic location, and returns a tuple comprising the data in the file and the full path to it.

start_link(opts)

Specs

start_link(list) :: t

Starts a source and returns its PID.

stop(source)

Specs

stop(t) :: :ok

Stops the source process.