The [file->copyTo] method copies the file referred to in the path of the [file] object to the new path specified by the first parameter. The method can take an optional second parameter which is a boolean that flags whether or not to overwrite an existing file. The default for this second parameter is false which means the method will not overwrite an existing file.
local(f) = file(...) #f->copyTo('/path/to/file.txt') local(f) = file(...) #f->copyTo('/path/to/file.txt', true)
The code below copies the 'style.css' file in the '/css/' directory to the '/rhino/' directory. Afterwards, each folder will have a copy of the file.
local(styles) = file('/css/style.css') #styles->copyTo('/rhino/style.css')
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