Typical use is to use the Reader factory function to instantiate an object of an appropriate derived class based on the file extension of the given path:

auto reader <- Reader(path);


A reader of a single buffer can then be performed with:

reader.read(buffer);


Finally, close the file:

reader.close();


Name Description

### Member Functions

Name Description
open Open a file.
close Close the file.

### Factory Function Details

Create a reader for a file.

• path: Path of the file.

The file extension of path is used to determine the precise type of the returned object. Supported file extension are .json and .yml.

### Member Function Details

function close()

Close the file.

#### open

function open(path:String)

Open a file.

• path : Path of the file.

Read the entire contents of the file.

• buffer: Buffer into which to read.