~ihabunek/triglav

ref: d1b5915f3e023d04850eabf702bda7207a337302 triglav/lib/triglav.ex -rw-r--r-- 474 bytes
d1b5915fIvan Habunek Validate platform distance from route 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