Sean P. DeNigris wrote:
Sven Van Caekenberghe-2 wrote
Yes, I think AbstractFileReference>>#/ could probably be extended in a
similar way, but I am no FileSystem expert...

ref1 := '/' asFileReference / 'Users' / 'me'.
gives a FileReference with Path / 'Users' / 'me'

ref2 := '/' asFileReference / 'Users/me'.
gives a FileReference with Path / 'Users/me'

I use the second version all the time, and even though the internal path
representation is different, it still "works" e.g. ref1 exists = ref2 exists

What about iterating through the parts of a path? Does the following produce output spread over lines the same way? (I haven't used FileSystem yet so treat this as pseudo-code...).
ref1 parts do: [ :pathPath | Transcript crShow: pathPart ]
Just wild speculation.... but it might be nice if the internal representation of ref2 splits up on the separator. Haven't thought about what might be the downside.

cheers -ben

-----
Cheers,
Sean
--
View this message in context: 
http://forum.world.st/ZnUrl-Add-multiple-segment-string-tp4672728p4677657.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.




Reply via email to