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.
FileWrite
                                             Up Contents Index Back
─────PWB Extensions─────────────────────────────────────────────────────────
 
  Syntax:  flagType FileWrite( char far *FileName, PFILE pfFile );
 
  Returns: True if the copy was successful, otherwise false.
 
  See:     DelFile, fChangeFile, FileNameToHandle, FileRead,
           fSetWindowWithFile, GetPfileFromName, pFileToBottom,
           pFileToTop, RemoveFile, Using Files
 
     FileWrite writes the contents of file buffer <pfFile> to a disk
     file specified by <FileName>. If <FileName> is a NULL or an empty
     string, FileWrite writes to the disk file with the same name as the
     file buffer associated with <pfFile>.
 
     FileWrite works by first writing to a temporary file with the same
     base name and the extension '.$'. If the write operation is
     successful, the temporary file is renamed as the destination file.
     The previous version is removed, deleted, or renamed, depending on
     the setting of the Backup switch.
 
     NOTE: Changes made to a file buffer with functions such as CopyLine
           and PutLine are not saved to disk until FileWrite is called
           for the file, either explicitly in an extension or automatic-
           ally by PWB.
                                    -♦-