2
0

WriteFile.st 339 B

1234567891011121314151617
  1. Object subclass: #WriteFile
  2. instanceVariableNames: ''
  3. package: 'WriteFileExample'!
  4. !WriteFile class methodsFor: 'main'!
  5. main
  6. | fs |
  7. console log: 'Writing a file called "message.txt".'.
  8. fs := require value: 'fs'.
  9. fs writeFileSync: 'message.txt' content: 'This file was written by Amber.'
  10. errFn: nil.
  11. ! !