System.IOUtils.TFile.OpenText

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

class function OpenText(const Path: string): TStreamReader; static;

C++

static System::Classes::TStreamReader* __fastcall OpenText(const System::UnicodeString Path);

Properties

Type Visibility Source Unit Parent
function public
System.IOUtils.pas
System.IOUtils.hpp
System.IOUtils TFile

Description

Opens a textual file for reading and returns a stream associated with that file.

Call OpenText to open a textual file for reading. OpenText returns a TStreamReader instance, which can be used only to read textual data. The following table lists the parameters expected by this method.



Name Meaning

Path

The path to the file that will be opened for reading.



Note: OpenText raises an exception if the file cannot be opened, the path is invalid, or the user has insufficient privileges to carry out this operation.

See Also