Created
April 3, 2022 08:30
-
-
Save KateLin-BASIC/df57c275237e9f720bf037ff837d3520 to your computer and use it in GitHub Desktop.
Create & Write File in Pharo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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