Lasso Soft Inc. > Home

[ file->asString ]

Method

The [file->asString] method returns a string representation of the [file] object. If you haven't actually done anything but initialize a [file] object, all you will see is 'File: ', but once the file has been opened / used, it will append the file descriptor to the output.

  • Syntax
local(f) = file(...)
#f->open
#f->asString
Examples
  • Beginner

Before and after demo

The code below demonstrates the difference between calling [file->asString] before you use or open the file and after you open or use the file.

Code

local(styles) = file('/css/style.css')
#styles->asString
'<br>'
#styles->openRead
#styles->asString

Result

File: 
File: filedesc

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