reader class : reader(string,bool) fitter

Description

Initializes and returns a new instance of reader class with file name and reading mode setting option.

Syntax

new reader(string fullPath, bool readOnly)

Arguments

ClassNameDescription
stringfullPathThe complete file path.
boolreadOnlyA value that indicates reading mode.

Return value

ClassDescription
readerAn instance that was initialized by specified value.

Sample code

1:

reader r = new reader("c:\somewhere...\sample.txt", true);

Notes

It's a wrapper of the System.IO.StreamReader.StreamReader(String,Encoding) constructor. changed in ver 1.0.0.2

The Encoding is UTF-8.

You can specify detection of the Unicode byte order mark(BOM) with second argument. changed in ver 1.0.0.2

If true, detects a Unicode byte order mark(BOM). Otherwise, does nothing. changed in ver 1.0.0.2

You can specify the reading mode with second argument.

If true, open the file in Read Only mode. In this case, no exception occurs even if the file is opened by another process.

If false, an exception will occur if the file is open in another process.


The meaning of the second argument has been changed in Rtype.Reader.dll Ver 1.0.0.2.

Links for reference

Copyright © Cooker All rights reserved.