[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mozilla-layout
Subject:    Re: Saving second version of a file
From:       Simon Fraser <sfraser () netscape ! com>
Date:       1999-09-27 19:54:34
[Download RAW message or body]

In article <37EF5632.F90D0D40@xmlw.ie>, Brian King <bking@xmlw.ie> 
wrote:

> In the Editor - Does anyone know of a quick method for saving another
> version of a file, at the same time as the initial save, with a
> different file extension?  
> I was looking at doing a second call to 'diskDoc->SaveFile' in
> nsEditor::SaveDocument.  Then I would do the extension renaming in
> nsDocument::SaveFile(..).  

nsEditor::SaveFile has a paramter 'aSaveCopy' which is for this
purpose; it allows you to save off a copy of the file, without
changing the disk file that the editor is looking at (c.f. the
normal 'Save' and 'Save As'.

So I think you just need to call nsEditor::SaveFile with
this param set to true.

Simon

-- 
          Simon Fraser   Entomologist
  sfraser@netscape.com   http://people.netscape.com/sfraser/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic