FileDirectory example: write a file
Last updated at 5:32 pm UTC on 27 May 2016
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'.