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 nextPutAll: 'line2'.
Maybe merge with:
How to write a file