'save in append mode

For the Compleat Fan
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

'save in append mode

Post by newdep »

Hi Lutz,

Is it possible to use 'save in append mode? currently 'save
overwrites which is a little tricky..

Regards, Norman.
-- (define? (Cornflakes))

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

You could use 'source', which since 8.6.1 works like 'save' but returns a string. That string than you could write to a file opened in append mode.

Or you could at first collect all the symbols and contexts you want to save and than do 'save' once, because 'save' can take multiple symbols/contexts.

Lutz

ps: for v.8.8 I have 'append-file' on my to-do list, which works like 'write-file' but appends. Then it will be even shorter.

Locked