Skip to content

Instantly share code, notes, and snippets.

@KateLin-BASIC
Created April 3, 2022 08:30
Show Gist options
  • Save KateLin-BASIC/df57c275237e9f720bf037ff837d3520 to your computer and use it in GitHub Desktop.
Save KateLin-BASIC/df57c275237e9f720bf037ff837d3520 to your computer and use it in GitHub Desktop.
Create & Write File in Pharo
| file |
file := 'filename.txt' asFileReference.
file ensureCreateFile.
file writeStreamDo: [ :stream | stream nextPutAll: 'Hello, World!' ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment