Skip to content

Instantly share code, notes, and snippets.

@ddosia
Last active August 29, 2015 14:20
Show Gist options
  • Save ddosia/caba34c13e8c14a8c46e to your computer and use it in GitHub Desktop.
Save ddosia/caba34c13e8c14a8c46e to your computer and use it in GitHub Desktop.
Reload = fun(PathPattern) ->
[Dir] = filelib:wildcard(PathPattern),
Mods = filelib:fold_files(
Dir, ".*.beam", false,
fun(F, Acc) ->
[list_to_atom(hd(string:tokens(lists:last(string:tokens(F, "/")), "."))) | Acc]
end,
[]
),
[l(M) || M <- Mods]
end.
Reload("lib/my_app*/ebin").
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment