IO Class

The IO class provides methods and properties for data input and output. The methods and properties in the class are used in association with an IO type object; therefore, an IO object must first be instantiated:

type IO objectName = Class.new("IO")

 

Ancestor

Reference

Descendants

None

Properties

Description

charsetElemName

Element name to be passed to $$^UCIOENCD()

charsetElemType

Element type to be passed to $$^UCIOENCD()

charsetName

Contains the name of the character set used to convert characters on .read() or .write()

device

Contains the complete device specification (directory and fileName). This is a read-only property.

directory

Defines the full path of the directory where the file is to be stored or accessed.

fileName

Defines the file name used to access the file.

openParams

Indicates the type of access granted to the device.

recordSize

Defines the length of the record within the device to be accessed.

timeout

Defines the number of seconds to wait for access to the device before returning an error.

 

Methods

Description

close

Closes a device based on the fileName and directory properties.

open

Opens a device based on the fileName and directory properties.

read

Reads a record from the device defined by the fileName and directory properties.

write

Writes a record to the device defined by the fileName and directory properties.