Append to file

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Append to file

Sean P. DeNigris
Administrator
I'm sure this is easy, but I can't figure it out. I tried a variety of things, most recently:

        FileStream oldFileNamed: logFile pathString do: [ :s | s nextPutAll: 'message to append' ].

Thanks.
Sean
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Append to file

Sven Van Caekenberghe
Sean,

Use:

        #setToEnd

Sven

On 30 Mar 2012, at 03:38, Sean P. DeNigris wrote:

> I'm sure this is easy, but I can't figure it out. I tried a variety of
> things, most recently:
>
> FileStream oldFileNamed: logFile pathString do: [ :s | s nextPutAll:
> 'message to append' ].
>
> Thanks.
> Sean
>
> --
> View this message in context: http://forum.world.st/Append-to-file-tp4517660p4517660.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>


smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Append to file

Sean P. DeNigris
Administrator
Sven Van Caekenberghe wrote
        #setToEnd
Ha ha, thanks. Too late at night... I was expecting a mode for appending...
Cheers,
Sean