PWB Extensions Help (ext.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
FileRead
◄Up► ◄Contents► ◄Index► ◄Back►
─────PWB Extensions─────────────────────────────────────────────────────────
Syntax: flagType FileRead( char far *FileName, PFILE pfFile );
Returns: True if the copy is successful, otherwise false.
See: DelFile, fChangeFile, FileNameToHandle, FileWrite,
fSetWindowWithFile, GetPfileFromName, pFileToBottom,
pFileToTop, RemoveFile, ◄Using Files►
FileRead reads the contents of the disk file specified by
<FileName> and stores the data in the file buffer <pfFile>. Any
existing contents of the file buffer are lost.
When you open a new file buffer with AddFile, the buffer is
initially empty. You must immediately call FileRead to initialize
the buffer with the current contents of a file, even when you open
a new empty pseudofile. The file name specified with AddFile is the
name that is associated with the new file buffer.
The primary use for FileRead is to read the contents of a disk file
into a file buffer having the same name as the disk file.
A secondary use is to copy a file by reading the contents of a disk
file with one name into a file buffer with a different name. When
the buffer is saved with FileWrite, a new disk file is created.
You must always call FileRead after calling Addfile. You can read
the contents of a disk file into the pseudofile. In this case, make
sure to reset the FAKE bit in the flags byte for the pseudofile.
Use GetEditoObject and SetEditorObject with the RQ_ALLFILE_FLAGS
request to modify the flag byte.
See: GetEditorObject, ◄Pseudofile Naming Convention►
-♦-