Lasso Soft Inc. > Home

[ file->readBytes ]


The [file->readBytes] method returns the entire contents of the file referenced by the [file] object's path as a byte stream.

  • Syntax
local(f) = file(...)
  • Beginner

Display the contents of a file on a web page

The code below reads the contents of a file and outputs it to a web page encoding the line breaks as '
' tags.


local(my_file) = file('test.txt')
#my_file->doWithClose => {^


"Great Scott!"
"I know. This is heavy."

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home



©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft