summaryrefslogtreecommitdiff
path: root/src/rebar_utils.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_utils.erl')
-rw-r--r--src/rebar_utils.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl
index 05f9349..9ecbbe6 100644
--- a/src/rebar_utils.erl
+++ b/src/rebar_utils.erl
@@ -31,7 +31,8 @@
get_os/0,
sh/2, sh/3,
sh_failfast/2,
- now_str/0]).
+ find_files/2,
+ now_str/0]).
-include("rebar.hrl").
@@ -80,6 +81,9 @@ sh(Command, Env, Dir) ->
sh_failfast(Command, Env) ->
sh(Command, Env).
+find_files(Dir, Regex) ->
+ filelib:fold_files(Dir, Regex, true, fun(F, Acc) -> [F | Acc] end, []).
+
now_str() ->
{{Year, Month, Day}, {Hour, Minute, Second}} = calendar:local_time(),
lists:flatten(io_lib:format("~4b/~2..0b/~2..0b ~2..0b:~2..0b:~2..0b",