1 %%%-------------------------------------------------------------------
2 %%% File : compile_hook.erl
6 %%% Created : 25 Mar 2011 by <>
7 %%%-------------------------------------------------------------------
8 -module(directory_hook
).
12 -include("makerl.hrl").
14 -spec
get_status(string(), [string()], options_type()) -> status_type().
15 get_status(Target
, [], Options
) ->
16 Root
= options:unsafe_get(Options
, '*root*'),
17 Rebased
= filestuff:rebase(Target
, Root
),
18 ?
DEBUG("[Directory GetStatus] ~p~n", [Rebased
]),
19 case filelib:is_dir(Rebased
) of
24 %% If it executes, is because get_status was false --> file did not exist.
26 -spec
build(string(), [string()], options_type()) -> build_result().
27 build(Target
, [], Options
) ->
28 Root
= options:unsafe_get(Options
, '*root*'),
29 Rebased
= filename:absname(filestuff:rebase(Target
, Root
)),
30 ?
DEBUG("[Directory Build] ~p~n", [Rebased
]),
31 %% os:cmd("mkdir " ++ filename:nativename(Rebased)),
32 case filelib:ensure_dir(Rebased
) of