|
55 | 55 | -export([format_stderr/2]). |
56 | 56 | -export([start_applications/1, stop_applications/1]). |
57 | 57 | -export([unfold/2, ceil/1]). |
58 | | --export([absolute_path/1]). |
59 | 58 |
|
60 | 59 | -import(mnesia). |
61 | 60 | -import(lists). |
|
125 | 124 | -spec(stop_applications/1 :: ([atom()]) -> 'ok'). |
126 | 125 | -spec(unfold/2 :: (fun ((A) -> ({'true', B, A} | 'false')), A) -> {[B], A}). |
127 | 126 | -spec(ceil/1 :: (number()) -> number()). |
128 | | --spec(absolute_path/1 :: (string()) -> string()). |
129 | 127 |
|
130 | 128 | -endif. |
131 | 129 |
|
@@ -477,17 +475,3 @@ ceil(N) -> |
477 | 475 | 0 -> N; |
478 | 476 | _ -> 1 + T |
479 | 477 | end. |
480 | | - |
481 | | -absolute_path(RelPath) -> |
482 | | - filename:join(absolute_path([], filename:split(filename:absname(RelPath)))). |
483 | | - |
484 | | -absolute_path([_ | ResultParts], [".." | Parts]) -> |
485 | | - absolute_path(ResultParts, Parts); |
486 | | -absolute_path([], [".." | Parts]) -> |
487 | | - absolute_path([], Parts); |
488 | | -absolute_path(ResultParts, ["." | Parts]) -> |
489 | | - absolute_path(ResultParts, Parts); |
490 | | -absolute_path(ResultParts, [Part | Parts]) -> |
491 | | - absolute_path([Part | ResultParts], Parts); |
492 | | -absolute_path(ResultParts, []) -> |
493 | | - lists:reverse(ResultParts). |
0 commit comments