Skip to content

Commit

Permalink
Delete file after creating it
Browse files Browse the repository at this point in the history
  • Loading branch information
noelwelsh committed Apr 10, 2024
1 parent 907063f commit c42cbdf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Binary file removed circle.png
Binary file not shown.
3 changes: 3 additions & 0 deletions docs/src/pages/pictures/writing.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,8 @@ val circle = Picture.circle(100)

circle.write[Png]("circle.png")
```
```scala mdoc:invisible
new java.io.File("circle.png").delete()
```

Instead of using `Png` you could use `Gif` or `Jpg` to specify those file formats. You'd probably want to change the file name as well if you change the format. That's it! Your masterpiece is now ready to share with the world.

0 comments on commit c42cbdf

Please sign in to comment.