Module rlx_util

Trivial utility file to help handle common tasks.

Copyright © (C) 2012 Erlware, LLC.

Authors: Eric Merritt (ericbmerritt@gmail.com).

Description

Trivial utility file to help handle common tasks

Function Index

error_reason/1get the reason for a particular relx error.
escript_foldl/3
get_code_paths/2Generates the correct set of code paths for the system.
indent/1ident to the level specified.
intensity/0Returns the color intensity, we first check the application envorinment if that is not set we check the environment variable RELX_COLOR.
is_error/1check to see if the value is a relx error.
load_file/3
make_script/2
mkdir_p/1Makes a directory including parent dirs if they are missing.
optional_to_string/1convert optional argument to empty string if undefined.
os_type/1
release_output_dir/2
render/1
render/2
symlink_or_copy/2
template_files/0
to_atom/1
to_binary/1
to_string/1
wildcard_paths/1expand wildcards and names in the given paths.

Function Details

error_reason/1

error_reason(X1::relx:error()) -> any()

get the reason for a particular relx error

escript_foldl/3

escript_foldl(Fun, Acc, File) -> any()

get_code_paths/2

get_code_paths(Release::rlx_release:t(), OutDir::file:name()) -> [file:name()]

Generates the correct set of code paths for the system.

indent/1

indent(Amount::non_neg_integer()) -> iolist()

ident to the level specified

intensity/0

intensity() -> any()

Returns the color intensity, we first check the application envorinment if that is not set we check the environment variable RELX_COLOR.

is_error/1

is_error(X1::relx:error() | any()) -> boolean()

check to see if the value is a relx error

load_file/3

load_file(Files, X2, Name) -> any()

make_script/2

make_script(Options::[term()], RunFun::fun(([term()]) -> Res)) -> Res

mkdir_p/1

mkdir_p(Path::string()) -> ok | {error, Reason::file:posix()}

Makes a directory including parent dirs if they are missing.

optional_to_string/1

optional_to_string(Value) -> any()

convert optional argument to empty string if undefined

os_type/1

os_type(State) -> any()

release_output_dir/2

release_output_dir(State::rlx_state:t(), Release::rlx_release:t()) -> string()

render/1

render(Template::binary() | iolist()) -> {ok, binary()} | {error, render_failed}

render/2

render(Template::binary() | iolist(), Data::proplists:proplist()) -> {ok, binary()} | {error, render_failed}

symlink_or_copy/2

symlink_or_copy(Source, Target) -> any()

template_files/0

template_files() -> any()

to_atom/1

to_atom(Binary::atom() | string() | binary()) -> atom()

to_binary/1

to_binary(String::iolist() | binary()) -> binary()

to_string/1

to_string(Binary::binary() | string() | atom()) -> string()

wildcard_paths/1

wildcard_paths(Paths::[file:filename_all()]) -> [string()]

expand wildcards and names in the given paths


Generated by EDoc, Nov 11 2022, 09:11:41.