help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'Objects' (#rtl)

TDosStream.Init

Instantiate a new instance of TDosStream.

Declaration

Source position: objects.pp line 313

constructor TDosStream.Init(

  FileName: FNameStr;

  Mode: Word

);

Description

Init instantiates an instance of TDosStream. The name of the file that contains (or will contain) the data of the stream is given in FileName. The Mode parameter determines whether a new file should be created and what access rights you have on the file. It can be one of the following constants:

stCreate
Creates a new file.
stOpenRead
Read access only.
stOpenWrite
Write access only.
stOpen
Read and write access.

For an example, see TDosStream.Truncate.

Errors

On error, Status is set to stInitError, and ErrorInfo is set to the dos error code.

See also

TDosStream.Done

  

Closes the file and cleans up the instance.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505