System::IO::File::ReadAllLines method

File::ReadAllLines method

Reads the content of the specified text file line by line to an array of strings using the specified character encoding.

static ArrayPtr<String> System::IO::File::ReadAllLines(const String &path, const EncodingPtr &encoding=Text::Encoding::get_UTF8())
ParameterTypeDescription
pathconst String&The path of the file to read
encodingconst EncodingPtr&The character encoding to use

ReturnValue

A string array each element of which represents a single line from the specified file

See Also