Hi, do not forget also that there is an entire chapter on FileSystem in here: http://files.pharo.org/books-pdfs/deep-into-pharo/2013-DeepIntoPharo-EN.pdf And I particularly recommend everybody dealing with files to read about how to manage encodings in here: http://files.pharo.org/books-pdfs/entreprise-pharo/2016-10-06-EnterprisePhar... On Mon, Mar 12, 2018 at 7:09 AM, john pfersich <jpfersich@gmail.com> wrote:
What OS are you using? My code was executed on Ubuntu 16.04.
Sent from my iPhone Encrypted email at jgpfersich@protonmail.com
On Mar 11, 2018, at 10:37, Alistair Grant <akgrant0710@gmail.com> wrote:
Hi Hannes,
On 11 March 2018 at 17:49, H. Hirzel <hannes.hirzel@gmail.com> wrote: The first solution given by Sven works fine.
dir := FileSystem workingDirectory / '..' / 'public'. dir ensureCreateDirectory. (dir / 'myFile.txt') writeStreamDo: [ :out | out << 'Hello World!' ].
The second version
obj := (FileSystem workingDirectory / '..' / 'public' / 'testing' / 'test2.txt') ensureCreateFile. obj writeStream
gives a #streamError in the class FileHandle. This is for Pharo 6.1
I don't get any error in 6.1 or 7.0.
Maybe supply a call stack?
In case you aren't familiar with this, the debugger has a little hamburger menu button to the right of "Through" which has "Copy Stack to Clipboard".
Cheers, Alistair
-- Guille Polito Research Engineer Centre de Recherche en Informatique, Signal et Automatique de Lille CRIStAL - UMR 9189 French National Center for Scientific Research - *http://www.cnrs.fr <http://www.cnrs.fr>* *Web:* *http://guillep.github.io* <http://guillep.github.io> *Phone: *+33 06 52 70 66 13