Hi Nicolai, I donât know if it works with both separators, but itâs simple and works on MacOS at least, so thatâs good enough for me now. Thanks for pointing it out to me !
On May 8, 2016, at 11:53, Nicolai Hess <nicolaihess@gmail.com> wrote:
2016-05-07 0:33 GMT+02:00 Johan Fabry <jfabry@dcc.uchile.cl <mailto:jfabry@dcc.uchile.cl>>: Hi all,
I have a question about the filesystem that I could not resolve using the documentation. The problem is as follows: I have a file reference that is 2 separate strings that I need to join into one complete file ref but I donât know how because I donât know what the platformâs file separator is.
For example, on a unix-like OS I get â/home/jfabryâ as one part and âtest/code/foo.txtâ as the other part, and I need to construct a FileReference to â/home/jfabry/test/code/foo.txtâ.On M$ I guess this would be 'C:\users\jfabry' and âtest\code\foo.txtâ, so I need to construct FileReference to 'C:\users\jfabry\test\code\foo.txtâ
And the bingo question is: what do I do if I both strings use different kinds of separators?
I think
â/home/jfabryâ asFileReference resolve: âtest/code/foo.txtâ
works on both platform, with both separators, no?
TIA,
---> Save our in-boxes! http://emailcharter.org <http://emailcharter.org/> <---
Johan Fabry - http://pleiad.cl/~jfabry <http://pleiad.cl/~jfabry> PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
---> Save our in-boxes! http://emailcharter.org <--- Johan Fabry - http://pleiad.cl/~jfabry PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile