Lasso Soft Inc. > Home

[ file->openWith ]

Method

The [file->openWith] method is a private method that is used to open a file for a [file] object. It takes two parameters, the first is the mode to use when opening the file and the second is a string with the path to the file to open.

  • Syntax
define file->myMethod => {
    local(mode) = ...
    local(path) = ...
    .openWith(#mode, #path)
}
Examples
  • Advanced

Create your own open method

The code below creates a new member method [file->openAppendOnly] for the [file] type that opens a file for just appending and creating, but no reading.

Code

define file->openAppendOnly => {
    .openWith(integer_bitOr(io_file_o_wronly, io_file_o_append, io_file_o_creat), .path)
}

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