1.7.2 Module anvl_fn

This module contains functions for composing and manipulating directory and file names.

1.7.2.1 Types

component()
-type component() :: binary() | string() | atom().

Directory component.

type()
-type type() :: list | binary.

Output type.

1.7.2.2 Functions

wildcard/2
-spec wildcard(string() | [string()],
               file:filename()) -> [file:filename()].

Run filelib:wildcard/2 in a specified directory, which is added to every found path.

stringify_atoms(L)
-spec stringify_atoms([component()]) -> [string()].

Convert all atoms in the filename component list to strings.

ensure_type/2
-spec ensure_type(file:filename(), list) -> [integer()];
                 (file:filename(), binary) -> binary().

Convert filename to the specified type.

workdir(Components, Type)
-spec workdir([component()], binary) -> binary();
             ([component()], list) -> [integer()].

Same as workdir/1, but only returns values of the specified type.

proj_dir(Project, Components)
-spec proj_dir(anvl_project:t(),
               [component()]) -> file:filename().

Return a filename relative to the project root.

rootdir(Components)
-spec rootdir([component()]) -> file:filename().

Return a filename relative to the root project directory.

workdir(Components)
-spec workdir([component()]) -> file:filename().

Return a filename within the working directory by joining the list of components.


JavaScript license information