PWB Extensions Help (ext.hlp) (Table of Contents; Topic list)
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.
                                    -♦-