https://github.com/giacomocavalieri/temporary
🗂️ Temporary files in Gleam
https://github.com/giacomocavalieri/temporary
Last synced: 26 days ago
JSON representation
🗂️ Temporary files in Gleam
- Host: GitHub
- URL: https://github.com/giacomocavalieri/temporary
- Owner: giacomocavalieri
- License: apache-2.0
- Created: 2024-06-03T15:05:20.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-06-04T08:13:40.000Z (11 months ago)
- Last Synced: 2025-03-28T17:00:03.935Z (30 days ago)
- Language: Gleam
- Homepage: https://hexdocs.pm/temporary/
- Size: 12.7 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# temporary
[](https://hex.pm/packages/temporary)
[](https://hexdocs.pm/temporary/)
🗂️ A package to work with temporary files and directories in Gleam!
## Installation
To add this package to your Gleam project:
```sh
gleam add temporary
```## Usage
You can create temporary files and directories using the `temporary.create`
function. And you don't have to worry about cleaning up, any temporary file will
be deleted automatically once the function is over!```gleam
import temporary
import simplifilepub fn main() {
use file <- temporary.create(temporary.file())
let assert Ok(_) = simplifile.write("Hello, world!", to: file)
}
```You can find the full documentation on [Hex!](https://hex.pm/packages/temporary)