System::IO::File::OpenText method

File::OpenText method

Opens the specified existing file for reading text using UTF-8 encoding with no sharing.

static StreamReaderPtr System::IO::File::OpenText(const String &path, const EncodingPtr &encoding=Text::Encoding::get_UTF8Unmarked())
ParameterTypeDescription
pathconst String&The path of the file to open
encodingconst EncodingPtr&The character encoding to use

ReturnValue

A shared pointer to a StreamWriter object associated with the opened file

See Also