elixir-temp
elixir-temp copied to clipboard
Temporary files and directories for Elixir
The README says: ``` By default, you have to cleanup the files by yourself, however, you can tell Temp to track the temporary files. You just need to call Temp.track...
### Problem: When stages of processing files involve reading and writing, each stage can return a path(s) to save time. But as of right now, Temp would clean up the...
``` data = path = Temp.open!("demo", &IO.write(&1, data)) ``` results in ``` ** (ErlangError) Erlang error: :no_translation (stdlib 3.15) :io.put_chars(#PID, :unicode, ) (elixir 1.12.0) lib/file.ex:1421: File.open/3 (temp 0.4.7) lib/temp.ex:108: Temp.open/2...
When calling `Temp.open!` with i.e. `Temp.open!(%{basedir: "/tmp", suffix: "foo-"}, &IO.write(&1, ""))` Dialyzer warns: ``` The call 'Elixir.Temp':'open!' (#{'basedir' := binary(), 'suffix' := binary()}, fun((_) -> 'ok')) breaks the contract (options(),...
I fixed all the compilation warnings on Elixir 1.16 Notes: - `Config` was added in 1.9 (released 5 years ago) https://elixir-lang.org/blog/2019/06/24/elixir-v1-9-0-released/ - sigil_c was added pre-1.0 The warnings were: ```...