View Source Changelog

v0.5.1 (2024-01-19)

v0.5.0 (2023-11-15)

This version changes the Briefly API, so read the notes below and upgrade with care.

  • Change the return value of Briefly.create/1 to be either {:ok, path} or {:error, Exception.t()}. The following exceptions may be returned:
    • %Briefly.NoRootDirectoryError{} - Briefly is unable to create a root temporary directory. The exception contains the temp dirs attempted.

    • %Briefly.WriteError{} - A temporary entry cannot be created. The exception contains the POSIX error code the caused the failure.

For example, if you have this:

case Briefly.create() do
  {:ok, path} -> path
  {:no_space, _} -> raise "no space"
  {:too_many_attempts, _} -> raise "too many attempts"
  {:no_tmp, _} -> raise "no tmp dirs"
end

...then change it to this:

case Briefly.create() do
  {:ok, path} -> path
  {:error, %Briefly.WriteError{code: :enospc}} -> raise "no space"
  {:error, %Briefly.WriteError{code: c}} when c in [:eexist, :eacces] -> raise "too many attempts"
  {:error, %Briefly.NoRootDirectoryError{}} -> raise "no tmp dirs"
  {:error, exception} when is_exception(exception) -> raise exception
end

If you were previously using :monitor_pid like this:

{:ok, path} = Briefly.create(monitor_pid: pid)

...then change it to this:

{:ok, path} = Briefly.create()
:ok = Briefly.give_away(path, pid)

v0.4.1 (2023-01-11)

  • Fix an issue with custom tmp dirs without a trailing slash (#24) @srgpqt

v0.4.0 (2023-01-09)

Note Briefly v0.4+ requires Elixir v1.11+.

  • Add :monitor_pid option to Briefly.create/1 (#19) @scarfacedeb
  • Avoid folder naming conflicts with monotonic time and random padding (#18) @zph
  • Add Briefly.cleanup/0 (#10) @gmalkas
  • Fix an issue where the sub directory is not created correctly (#9) @Schultzer
  • Fix error reasons to conform to posix error codes (#4) @ngeraedts
  • Numerous updates for CI / language changes (h/t @bryanstearns @k-cross @szajbus @devstopfix @sgerrand @mad42 @warmwaffles)

v0.3.0 (2015-09-06)

Add support for temporary directories

v0.2.1 (2015-09-03)

Update license

v0.2.0 (2015-09-03)

Add create options

v0.1.1 (2015-09-03)

Update docs

v0.1.0 (2015-09-03)

Initial release