Dec. 1, 2017
4:55 p.m.
Am 01.12.17 um 17:32 schrieb Prof. Andrew P. Black:
I have a file reference containing multiple occurrences of .., like this
File @ /Users/black/graceProgs/lists/../../Development/mg/gracelang/albums_junk.grace
How do I simplify this to show the simpler path without the .. ? There should be a method on FileReference, no? Something like #normalize ? Or maybe FileReference should do this automatically when it is created?
On Pharo 6 use "asAbsolute" on a FileReference, like this: '/Users/black/graceProgs/lists/../../Development/mg/gracelang/albums_junk.grace' asFileReference asAbsolute "File @ /Users/black/Development/mg/gracelang/albums_junk.grace" Cheers, Andreas -- Andreas Brodbeck www.mindclue.ch