File slurping in SmallTalk

/ Published in: SmallTalk
Save to your folder(s)

Reading the contents of a whole file as a string.

Copy this code and paste it in your HTML
  1. FileStream readOnlyFileNamed: 'file.txt'
  2. do: [:file | file contentsOfEntireFile]

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.