Bundlex v0.1.5 Bundlex.Helper.DirectoryHelper View Source

Module containing helper functions that ease traversing directories.

Link to this section Summary

Functions

Fixes slashes in the given path to match convention used on current operating system

Tries to find a directory that matches given pattern that has the biggest version number if it is expected to be a suffix

Link to this section Functions

Link to this function fix_slashes(path) View Source
fix_slashes(String.t()) :: String.t()

Fixes slashes in the given path to match convention used on current operating system.

Internally all elixir functions use slash as a path separator, even if running on windows, and it’s not a bug but a feature (lol).

See https://github.com/elixir-lang/elixir/issues/1236

Link to this function wildcard(pattern) View Source
wildcard(String.t()) :: nil | String.t()

Tries to find a directory that matches given pattern that has the biggest version number if it is expected to be a suffix.