Lasso Soft Inc. > Home

[ file->linkTo ]

Method

The [file->linkTo] method creates a link to 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 to create a hard link instead of a symbolic link. The default for this second parameter is false which means the method will create a symbolic link.

  • Syntax
local(f) = file(...)
#f->linkTo('/path/to/file.txt')

local(f) = file(...)
#f->linkTo('/path/to/file.txt', true)
Examples
  • Beginner

Create a symbolic link to a file

The code below creates a symbolic link to the 'style.css' file in the '/css/' directory to the '/rhino/' directory.

Code

local(styles) = file('/css/style.css')
#styles->linkTo('/rhino/style.css')

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