links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
FileDirectory example: write a file
Last updated at 3:13 pm UTC on 9 March 2019
Assuming you are running a Squeak "All-in-one" distribution the following code writes a file 'hello.txt' to the directory where the 'All-in-one' folder is

 | output |
 output :=  FileStream fileNamed: 
         (FileDirectory default containingDirectory containingDirectory  fullNameFor:  'hello.txt').
 output nextPutAll: 'line1'.
 output cr.
 output nextPutAll: 'line2'.
 output close.

Maybe merge with:
How to write a file