The [file->exists] method checks to see if the path set for the [file] object exists and returns true if it does and false if it doesn't.
local(f) = file(...)
#f->exists
The code below checks to see if a file exists and creates it if it doesn't.
Code
local(styles) = file('/css/styles.css')
if(not #styles->exists) => {
#styles->writeString('')
}
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 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft
Recent Comments