~ihabunek/triglav

ref: 1a8ba58407fc58b933347c9bec5bcb4358191cbb triglav/lib/triglav.ex -rw-r--r-- 474 bytes
1a8ba584Ivan Habunek Use derived data for route detail view 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