March 11, 2018
5:37 p.m.
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