Re: [Pharo-users] How do I ask the FileSystem to resolve a relative path?

2018-03-12 Thread Alistair Grant
Hi Sven, On 12 March 2018 at 19:38, Sven Van Caekenberghe wrote: > Hi Alistair, > >> On 12 Mar 2018, at 19:06, Alistair Grant wrote: >> >> On 12 March 2018 at 10:03, Guillermo Polito >> wrote: >>> >>> Hi, >>> >>> do not forget

Re: [Pharo-users] How do I ask the FileSystem to resolve a relative path?

2018-03-12 Thread Sven Van Caekenberghe
Hi Alistair, > On 12 Mar 2018, at 19:06, Alistair Grant wrote: > > On 12 March 2018 at 10:03, Guillermo Polito wrote: >> >> Hi, >> >> do not forget also that there is an entire chapter on FileSystem in here: >> >>

Re: [Pharo-users] How do I ask the FileSystem to resolve a relative path?

2018-03-12 Thread Alistair Grant
On 12 March 2018 at 10:03, Guillermo Polito wrote: > > 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

Re: [Pharo-users] How do I ask the FileSystem to resolve a relative path?

2018-03-12 Thread Guillermo Polito
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:

Re: [Pharo-users] How do I ask the FileSystem to resolve a relative path?

2018-03-12 Thread john pfersich
What OS are you using? My code was executed on Ubuntu 16.04. Sent from my iPhone Encrypted email at jgpfers...@protonmail.com > On Mar 11, 2018, at 10:37, Alistair Grant wrote: > > Hi Hannes, > >> On 11 March 2018 at 17:49, H. Hirzel wrote: >>

Re: [Pharo-users] How do I ask the FileSystem to resolve a relative path?

2018-03-11 Thread Alistair Grant
Hi Hannes, On 11 March 2018 at 17:49, H. Hirzel wrote: > The first solution given by Sven works fine. > > dir := FileSystem workingDirectory / '..' / 'public'. > dir ensureCreateDirectory. > (dir / 'myFile.txt') writeStreamDo: [ :out | out << 'Hello World!'

Re: [Pharo-users] How do I ask the FileSystem to resolve a relative path?

2018-03-11 Thread H. Hirzel
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' /

Re: [Pharo-users] How do I ask the FileSystem to resolve a relative path?

2018-03-11 Thread Sven Van Caekenberghe
> On 11 Mar 2018, at 10:39, john pfersich wrote: > > or try > > dir := (FileSystem workingDirectory / '..' / 'public' / 'testing' / > 'test2.txt') ensureCreateFile. > dir writeStream. Indeed! > On Sun, Mar 11, 2018 at 1:16 AM, Sven Van Caekenberghe

Re: [Pharo-users] How do I ask the FileSystem to resolve a relative path?

2018-03-11 Thread john pfersich
or try dir := (FileSystem workingDirectory / '..' / 'public' / 'testing' / 'test2.txt') ensureCreateFile. dir writeStream. On Sun, Mar 11, 2018 at 1:16 AM, Sven Van Caekenberghe wrote: > > > > On 11 Mar 2018, at 09:42, H. Hirzel wrote: > > > > Hello > >

Re: [Pharo-users] How do I ask the FileSystem to resolve a relative path?

2018-03-11 Thread Sven Van Caekenberghe
> On 11 Mar 2018, at 09:42, H. Hirzel wrote: > > Hello > > This is a follow up question to 'How do I make sure a directory exists?' > > The answer to that question was > > dir := FileSystem workingDirectory / '..' / 'public'. > dir ensureCreateDirectory.