Current section
Files
Jump to
Current section
Files
src/go_over@util@constants.erl
-module(go_over@util@constants).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).
-define(FILEPATH, "src/go_over/util/constants.gleam").
-export([go_over_path/1]).
-if(?OTP_RELEASE >= 27).
-define(MODULEDOC(Str), -moduledoc(Str)).
-define(DOC(Str), -doc(Str)).
-else.
-define(MODULEDOC(Str), -compile([])).
-define(DOC(Str), -compile([])).
-endif.
?MODULEDOC(false).
-file("src/go_over/util/constants.gleam", 16).
?DOC(false).
-spec go_over_path(boolean()) -> binary().
go_over_path(Global) ->
{Path, Name} = case Global of
true ->
{begin
_pipe = directories:cache_dir(),
gxyz@cli:hard_fail_with_msg(
_pipe,
<<"could not get cache directory"/utf8>>
)
end,
<<"go-over"/utf8>>};
false ->
{begin
_pipe@1 = simplifile:current_directory(),
gxyz@cli:hard_fail_with_msg(
_pipe@1,
<<"could not get current directory"/utf8>>
)
end,
<<".go-over"/utf8>>}
end,
filepath:join(Path, Name).