aboutsummaryrefslogtreecommitdiffstats
path: root/src/rcl_util.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rcl_util.erl')
-rw-r--r--src/rcl_util.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/rcl_util.erl b/src/rcl_util.erl
index c0b5c5d..be20302 100644
--- a/src/rcl_util.erl
+++ b/src/rcl_util.erl
@@ -21,8 +21,10 @@
%%% @doc Trivial utility file to help handle common tasks
-module(rcl_util).
--export([mkdir_p/1]).
+-export([mkdir_p/1,
+ indent/1]).
+-define(ONE_LEVEL_INDENT, " ").
%%============================================================================
%% types
%%============================================================================
@@ -41,6 +43,11 @@ mkdir_p(Path) ->
DirName = filename:join([filename:absname(Path), "tmp"]),
filelib:ensure_dir(DirName).
+%% @doc ident to the level specified
+-spec indent(non_neg_integer()) -> iolist().
+indent(Amount) when erlang:is_integer(Amount) ->
+ [?ONE_LEVEL_INDENT || _ <- lists:seq(1, Amount)].
+
%%%===================================================================
%%% Test Functions
%%%===================================================================