config v0.1.0 Config.Configuration

Handles macroses used inside Config.config/2 block.

Beside macroses, defined in this module following macroses also available in Config.config/2 block:

Summary

Macros

Adds config file pattern

Adds search path where config files will be searched

Resets config file pattern list

Resets search paths list where config files will be searched

Removes config file pattern

Removes path from search paths list where config files will be searched

Types

t :: %Config.Configuration{children: Config.Container.container_content, files: [String.t], name: Atom.t, paths: [String.t], type: Config.Container.container_type}

Macros

add_file(file)

Adds config file pattern.

Patterns are evaluated at runtime with name local variable that contains configuration name and ext that contains file extension (without leading dot). To use this variables in file name use something like this: "#{var!(name)}.#{var!(ext)}".

add_path(path)

Adds search path where config files will be searched.

Relative paths expanded using current folder.

files(files)

Resets config file pattern list.

By default file list contains one value: ".#{name}.#{ext}".

paths(paths)

Resets search paths list where config files will be searched.

Relative paths expanded using current folder.

By default search paths consists of current folder, user home folder and application folder.

remove_file(file)

Removes config file pattern.

remove_path(path)

Removes path from search paths list where config files will be searched.

Relative paths expanded using current folder.