Bundlex.Helper.PathHelper (Bundlex v0.5.1) 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 path that matches given pattern that has the biggest version number if it is expected to be a suffix.

Link to this section Functions

Specs

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

latest_wildcard(pattern)

View Source

Specs

latest_wildcard(String.t()) :: nil | String.t()

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