System.IOUtils.TFile.OpenRead
Delphi
class function OpenRead(const Path: string): TFileStream; static;
C++
static System::Classes::TFileStream* __fastcall OpenRead(const System::UnicodeString Path);
Properties
| Type | Visibility | Source | Unit | Parent | 
|---|---|---|---|---|
| function | public | System.IOUtils.pas System.IOUtils.hpp  | 
        System.IOUtils | TFile | 
Description
Opens a file for reading and returns a stream associated with that file.
Call OpenRead to open a file for reading. OpenRead returns a TFileStream instance, which can be used only to read 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: OpenRead raises an exception if the file cannot be opened, the path is invalid, or the user has insufficient privileges to carry out this operation.