Highlighted Features
- Create temporary files with prefix and extname options.
- Files are removed after the requesting process exits.
- File creation is based on Plug.Upload’s robust retry logic.
- Configurable; built-in support for system environment variables and fallbacks.
Use Briefly to create a temporary file:
{:ok, path} = Briefly.create()
Then you can write to the path and read the contents of the file:
File.write!(path, "My temp file contents")
File.read!(path)
# => "My temp files contents"
When the requesting process exits, the file at path
is removed.
Refer to the usage guide for more examples:
https://hexdocs.pm/briefly/usage.html