summaryrefslogtreecommitdiff
path: root/src/rebar_dir.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_dir.erl')
-rw-r--r--src/rebar_dir.erl13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/rebar_dir.erl b/src/rebar_dir.erl
index 628ebd3..4a9bf09 100644
--- a/src/rebar_dir.erl
+++ b/src/rebar_dir.erl
@@ -3,6 +3,8 @@
-export([base_dir/1,
deps_dir/1,
deps_dir/2,
+ checkouts_dir/1,
+ checkouts_dir/2,
plugins_dir/1,
lib_dirs/1,
home_dir/0,
@@ -40,6 +42,17 @@ deps_dir(State) ->
deps_dir(DepsDir, App) ->
filename:join(DepsDir, App).
+root_dir(State) ->
+ rebar_state:get(State, root_dir, ?DEFAULT_ROOT_DIR).
+
+-spec checkouts_dir(rebar_state:t()) -> file:filename_all().
+checkouts_dir(State) ->
+ filename:join(root_dir(State), rebar_state:get(State, checkouts_dir, ?DEFAULT_CHECKOUTS_DIR)).
+
+-spec checkouts_dir(rebar_state:t(), file:filename_all()) -> file:filename_all().
+checkouts_dir(State, App) ->
+ filename:join(checkouts_dir(State), App).
+
-spec plugins_dir(rebar_state:t()) -> file:filename_all().
plugins_dir(State) ->
case lists:member(global, rebar_state:current_profiles(State)) of