~ihabunek/triglav

ref: 3a1876166aa129c76c1b09fc562af764d04df4e1 triglav/lib/triglav.ex -rw-r--r-- 474 bytes
3a187616Ivan Habunek Fix detecting unexpected master route members 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
defmodule Triglav do
  @moduledoc """
  Triglav keeps the contexts that define your domain
  and business logic.

  Contexts are also responsible for managing your data, regardless
  if it comes from the database, an external API or others.
  """

  def tmp_dir() do
    with dir when is_binary(dir) <- System.tmp_dir(),
         path = Path.join([dir, "triglav_tmp"]),
         :ok <- File.mkdir_p(path) do
      {:ok, path}
    else
      _ -> :error
    end
  end
end

3