Re: [Pharo-users] How do I make sure a directory exists?

2018-03-12 Thread Sven Van Caekenberghe
> On 12 Mar 2018, at 10:11, Guillermo Polito wrote: > > You can also do: > > FileSystem disk workingDirectory parent / 'public'. > > I feel it cleaner :) Indeed, the power of messages. > On Sun, Mar 11, 2018 at 10:27 AM, john pfersich wrote: > Works on Ubuntu 16.04 > > Sent from my iPhone

Re: [Pharo-users] How do I make sure a directory exists?

2018-03-12 Thread Guillermo Polito
You can also do: FileSystem disk workingDirectory parent / 'public'. I feel it cleaner :) On Sun, Mar 11, 2018 at 10:27 AM, john pfersich wrote: > Works on Ubuntu 16.04 > > Sent from my iPhone > Encrypted email at jgpfers...@protonmail.com > > On Mar 10, 2018, at 12:38, Cyril Ferlicot > wrote

Re: [Pharo-users] How do I make sure a directory exists?

2018-03-11 Thread john pfersich
Works on Ubuntu 16.04 Sent from my iPhone Encrypted email at jgpfers...@protonmail.com > On Mar 10, 2018, at 12:38, Cyril Ferlicot wrote: > > >> On sam. 10 mars 2018 at 21:36, H. Hirzel wrote: >> Yes, #ensureCreateDirectory is available. >> >> I'd like to make sure a directory 'public' is av

Re: [Pharo-users] How do I make sure a directory exists?

2018-03-10 Thread Cyril Ferlicot
On sam. 10 mars 2018 at 21:49, H. Hirzel wrote: > I note that 'workingDirectory' is the directory where Pharo is > launched from. In my case it happens to be the same where the image is > in but that cannot be assumed generally. The fact that "workingDirectory" point to the folder from where Ph

Re: [Pharo-users] How do I make sure a directory exists?

2018-03-10 Thread H. Hirzel
I note that 'workingDirectory' is the directory where Pharo is launched from. In my case it happens to be the same where the image is in but that cannot be assumed generally. So (FileSystem workingDirectory / '..' / 'public') ensureCreateDirectory Worked fine. Thanks to all! --Hannes On

Re: [Pharo-users] How do I make sure a directory exists?

2018-03-10 Thread Peter Uhnák
Operator priority :); unary messages `#ensureCreateDirectory have precedence over binary `#/` (FileSystem disk workingDirectory / '../public') ensureCreateDirectory. Also please note that the workingDirectory should be based on where Pharow as launched from, if you are looking for the image direc

Re: [Pharo-users] How do I make sure a directory exists?

2018-03-10 Thread Cyril Ferlicot
On sam. 10 mars 2018 at 21:36, H. Hirzel wrote: > Yes, #ensureCreateDirectory is available. > > I'd like to make sure a directory 'public' is available as a sibling > directory of the working directory (the directory where the Pharo > image is in) > > However > > FileSystem disk workingDirect

Re: [Pharo-users] How do I make sure a directory exists?

2018-03-10 Thread H. Hirzel
Yes, #ensureCreateDirectory is available. I'd like to make sure a directory 'public' is available as a sibling directory of the working directory (the directory where the Pharo image is in) However FileSystem disk workingDirectory / '../public' ensureCreateDirectory does not work as F

Re: [Pharo-users] How do I make sure a directory exists?

2018-03-10 Thread Peter Uhnák
> > There is #ensureCreateDirectory in Pharo but I don't know if it will check > the parents exists. (And I don't have a Pharo image to check. > It will, at least on Windows. Peter

Re: [Pharo-users] How do I make sure a directory exists?

2018-03-10 Thread Cyril Ferlicot
On sam. 10 mars 2018 at 21:02, H. Hirzel wrote: > Hello > > In Squeak and the dialect independent FileMan [1] there is > > > FileDirectory >assureExistence > "Make sure the current directory exists. If necessary, create > all > parts in between" > > > What is the equivalen

Re: [Pharo-users] How do I make sure a directory exists?

2018-03-10 Thread Sven Van Caekenberghe
Probably #ensureCreateDirectory > On 10 Mar 2018, at 21:01, H. Hirzel wrote: > > Hello > > In Squeak and the dialect independent FileMan [1] there is > > >FileDirectory > assureExistence > "Make sure the current directory exists. If necessary, create all > parts in between

[Pharo-users] How do I make sure a directory exists?

2018-03-10 Thread H. Hirzel
Hello In Squeak and the dialect independent FileMan [1] there is FileDirectory assureExistence "Make sure the current directory exists. If necessary, create all parts in between" What is the equivalent Pharo method? BTW is there a cheat sheet for FileSystem operations in