An interresting fact is that exists answer true to (FileSystem root / 'aPath/cat.jpg') exists
2016-04-18 11:25 GMT+02:00 Nicolai Hess <nicolaih...@gmail.com>: > > > 2016-04-18 11:08 GMT+02:00 Sven Van Caekenberghe <s...@stfx.eu>: > >> Think of it as follows: Pharo is cross platform, forward slash is used on >> *nix and Mac OS, but not Windows where it is backslash. FileReference is an >> object oriented API that abstracts over that. Asking for an interpretation >> of the sub parts is a step too far (even if it would be handy). >> > > We have an open bugtracker issue about this. > There is no conclusion right now how to handle this. > I understand that this path interpretation is a step too far , on the > other hand we already do this in #resolveString: > > see output of (on a windows platform(!)) > > (FileSystem root / 'aPath/file.txt') basename. > (FileSystem root / 'aPath\file.txt') basename. > > vs. > > (FileSystem root resolveString:'aPath/file.txt') basename. > (FileSystem root resolveString:'aPath\file.txt') basename. > > #/ could behave like #resolveString > > And for example: > > (FileLocator vmDirectory / 'testdir/file.txt') writeStream << 'Test' > > will succeed, if the directory <vmdirectory>/testdir/ exists (it does not > try to create a file called "testdir/file.txt", but really just "file.txt"). > > > > (see issue 13217) > > > > > >> >> > On 18 Apr 2016, at 10:56, Valentin Ryckewaert < >> valentin.ryckewa...@gmail.com> wrote: >> > >> > I'm on Linux >> > >> > Is it wanted that root / 'a' / 'foo.txt' is different than root / >> '.foo.txt' ? I find that strange >> > >> > 2016-04-18 10:52 GMT+02:00 Cyril Ferlicot Delbecque < >> cyril.ferli...@gmail.com>: >> > >> > >> > On 18/04/2016 10:44, Valentin Ryckewaert wrote: >> > > Using your method (A string asFileReference) it works thanks ! >> > > >> > > But if you use FileSystem root / .... I get the "same" object but it's >> > > still not working. Did I make a mistake somewhere? >> > > >> > >> > Hi, >> > >> > Did you try `FileSystem root / 'a' / 'Path' / 'cat.jpg'` instead of >> > `FileSystem root / 'aPath/cat.jpg'`? >> > >> > On what OS are you? I remember I had some trouble with the root on >> Windows. >> > >> > -- >> > Cyril Ferlicot >> > >> > http://www.synectique.eu >> > >> > 165 Avenue Bretagne >> > Lille 59000 France >> > >> > >> >> >> >