Igor Stasenko wrote
>
> because you can always strip down unwanted information (just do regexp
> like '.app/Contents'),
>
Or with PetitParser:
| vmPath bundleExtension bundlePathParser bundlePath |
vmPath := OSProcess programName.
bundleExtension := '.app' asParser.
bundlePathParser := (bundleExtension negate star, bundleExtension)
flatten.
bundlePath := bundlePathParser parse: vmPath.
^ FSFilesystem disk root resolve: bundlePath.
--
View this message in context:
http://forum.world.st/VM-Smalltalk-getSystemAttribute-tp4122708p4257314.html
Sent from the Pharo Smalltalk mailing list archive at Nabble.com.