base.Channel.openFile

Opening a file channel.

Syntax

openFile(
   path STRING,
   mode STRING )
  1. path is the path to the file to open.
  2. mode is the open mode, see usage for details.

Usage

The openFile() method can be used to open a file for reading, writing, or both.

The opening mode can be one of the following :

Any of these modes can be followed by:

If the opening mode is not one of the above letters, the method will raise error -8085.

When you use the w or a modes, the file is created if it does not exist.

The method raises error -8084 if the channel cannot be opened.

CALL ch.openFile( "file.txt", "w" )