System::IO::File::OpenText 方法

File::OpenText method

使用 UTF-8 编码打开指定的现有文件进行文本读取,且不共享。

static StreamReaderPtr System::IO::File::OpenText(const String &path, const EncodingPtr &encoding=Text::Encoding::get_UTF8Unmarked())
参数类型描述
路径const String&要打开的文件路径
encodingconst EncodingPtr&要使用的字符编码

ReturnValue

一个指向已打开文件的 StreamWriter 对象的共享指针

另见