Hello, I use in Pharo 2.0 the class FileSystem to write in a text file(csv format). I find only two options writeStream and readStream. I would not like each time to overwrite the contents of my file and I do not find the option appendStream. How can I do? working := FileSystem disk workingDirectory. stream := (working / 'test.csv') writeStream stream nextPutAll: 'something'. stream nextPutAll: ';' . stream nextPutAll: 'other'. stream close. ------------------------------------ Hayatou Â
Hayatou, Open a WriteStream and call #setToEnd before writing. Sven On 24 Jun 2013, at 14:27, Hayatou Oumarou <hayaty55@yahoo.fr> wrote:
Hello, I use in Pharo 2.0 the class FileSystem to write in a text file(csv format). I find only two options writeStream and readStream. I would not like each time to overwrite the contents of my file and I do not find the option appendStream. How can I do?
working := FileSystem disk workingDirectory. stream := (working / 'test.csv') writeStream stream nextPutAll: 'something'. stream nextPutAll: ';' . stream nextPutAll: 'other'. stream close. ------------------------------------ Hayatou
-- Sven Van Caekenberghe Proudly supporting Pharo http://pharo.org http://association.pharo.org http://consortium.pharo.org
On Mon, 2013-06-24 at 14:43 +0200, Sven Van Caekenberghe wrote:
Hayatou,
Open a WriteStream and call #setToEnd before writing.
Sven
I'm sure these changes in the API are documented somewhere extensively, however I cannot find it. Do you have any pointers/links? TIA,
On 24 Jun 2013, at 14:27, Hayatou Oumarou <hayaty55@yahoo.fr> wrote:
Hello, I use in Pharo 2.0 the class FileSystem to write in a text file(csv format). I find only two options writeStream and readStream. I would not like each time to overwrite the contents of my file and I do not find the option appendStream. How can I do?
working := FileSystem disk workingDirectory. stream := (working / 'test.csv') writeStream stream nextPutAll: 'something'. stream nextPutAll: ';' . stream nextPutAll: 'other'. stream close.
-- Bahman Movaqar (http://BahmanM.com) ERP Evaluation, Implementation & Deployment Consultant PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)
On 24 Jun 2013, at 19:42, Bahman Movaqar <Bahman@BahmanM.com> wrote:
On Mon, 2013-06-24 at 14:43 +0200, Sven Van Caekenberghe wrote:
Hayatou,
Open a WriteStream and call #setToEnd before writing.
Sven
I'm sure these changes in the API are documented somewhere extensively, however I cannot find it. Do you have any pointers/links?
I don't understand the question. AFAIK, there has been anything else. This is the way it is. I find it quite logical. Not that the Stream hierarchy makes perfect sense in all cases, but that is another story ;-)
TIA,
On 24 Jun 2013, at 14:27, Hayatou Oumarou <hayaty55@yahoo.fr> wrote:
Hello, I use in Pharo 2.0 the class FileSystem to write in a text file(csv format). I find only two options writeStream and readStream. I would not like each time to overwrite the contents of my file and I do not find the option appendStream. How can I do?
working := FileSystem disk workingDirectory. stream := (working / 'test.csv') writeStream stream nextPutAll: 'something'. stream nextPutAll: ';' . stream nextPutAll: 'other'. stream close.
-- Bahman Movaqar (http://BahmanM.com)
ERP Evaluation, Implementation & Deployment Consultant PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)
On Mon, 2013-06-24 at 19:59 +0200, Sven Van Caekenberghe wrote:
On 24 Jun 2013, at 19:42, Bahman Movaqar <Bahman@BahmanM.com> wrote:
On Mon, 2013-06-24 at 14:43 +0200, Sven Van Caekenberghe wrote:
Hayatou,
Open a WriteStream and call #setToEnd before writing.
I'm sure these changes in the API are documented somewhere extensively, however I cannot find it. Do you have any pointers/links?
I don't understand the question. AFAIK, there has been anything else. This is the way it is. I find it quite logical.
Thank you.
Not that the Stream hierarchy makes perfect sense in all cases, but that is another story ;-)
TIA,
On 24 Jun 2013, at 14:27, Hayatou Oumarou <hayaty55@yahoo.fr> wrote:
Hello, I use in Pharo 2.0 the class FileSystem to write in a text file(csv format). I find only two options writeStream and readStream. I would not like each time to overwrite the contents of my file and I do not find the option appendStream. How can I do?
working := FileSystem disk workingDirectory. stream := (working / 'test.csv') writeStream stream nextPutAll: 'something'. stream nextPutAll: ';' . stream nextPutAll: 'other'. stream close.
-- Bahman Movaqar (http://BahmanM.com) ERP Evaluation, Implementation & Deployment Consultant PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)
participants (4)
-
Bahman Movaqar -
Hayatou Oumarou -
Sven Van Caekenberghe -
Sven Van Caekenberghe