Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 61 lines (55 sloc) 2.567 kB
bda962a @rsaccon more work on tags
rsaccon authored
1 %%%-------------------------------------------------------------------
2 %%% File: erlydtl_deps.erl
3 %%% @author Roberto Saccon <rsaccon@gmail.com> [http://rsaccon.com]
873b0ef @rsaccon monster commit: integrated Evan's changes (much improved everything)
rsaccon authored
4 %%% @author Evan Miller <emmiller@gmail.com>
5 %%% @copyright 2008 Roberto Saccon, Evan Miller
bda962a @rsaccon more work on tags
rsaccon authored
6 %%% @doc
7 %%% ErlyDTL helper module
8 %%% @end
9 %%%
10 %%% The MIT License
11 %%%
873b0ef @rsaccon monster commit: integrated Evan's changes (much improved everything)
rsaccon authored
12 %%% Copyright (c) 2007 Roberto Saccon, Evan Miller
bda962a @rsaccon more work on tags
rsaccon authored
13 %%%
14 %%% Permission is hereby granted, free of charge, to any person obtaining a copy
15 %%% of this software and associated documentation files (the "Software"), to deal
16 %%% in the Software without restriction, including without limitation the rights
17 %%% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18 %%% copies of the Software, and to permit persons to whom the Software is
19 %%% furnished to do so, subject to the following conditions:
20 %%%
21 %%% The above copyright notice and this permission notice shall be included in
22 %%% all copies or substantial portions of the Software.
23 %%%
24 %%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25 %%% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 %%% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27 %%% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 %%% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29 %%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
30 %%% THE SOFTWARE.
31 %%%
873b0ef @rsaccon monster commit: integrated Evan's changes (much improved everything)
rsaccon authored
32 %%% @since 2007-12-16 by Roberto Saccon, Evan Miller
bda962a @rsaccon more work on tags
rsaccon authored
33 %%%-------------------------------------------------------------------
34 -module(erlydtl_deps).
35 -author('rsaccon@gmail.com').
873b0ef @rsaccon monster commit: integrated Evan's changes (much improved everything)
rsaccon authored
36 -author('emmiller@gmail.com').
bda962a @rsaccon more work on tags
rsaccon authored
37
38 %% API
39 -export([get_base_dir/0, get_base_dir/1]).
40
41 %%====================================================================
42 %% API
43 %%====================================================================
44 %% @spec get_base_dir(Module) -> string()
45 %% @doc Return the application directory for Module. It assumes Module is in
46 %% a standard OTP layout application in the ebin or src directory.
47 get_base_dir(Module) ->
48 {file, Here} = code:is_loaded(Module),
49 filename:dirname(filename:dirname(Here)).
50
51 %% @spec get_base_dir() -> string()
52 %% @doc Return the application directory for this application. Equivalent to
53 %% get_base_dir(?MODULE).
54 get_base_dir() ->
55 get_base_dir(?MODULE).
56
57 %%====================================================================
58 %% Internal functions
59 %%====================================================================
60
Something went wrong with that request. Please try again.