The method FileLocator.resolve(url)
can be used to translate an address bundleentry://something/somewhere/x.txt
to a proper file URL for /mnt/foo
I just found this code:
http://code.google.com/p/dart/source/browse/branches/bleeding_edge/dart/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/BundledSystemLibrary.java?r=2057
The relevant lines indeed help:
// We need to use the 3-arg constructor of URI in order to properly escape file system chars.
URI resolvedUri = new URI(resolvedUrl.getProtocol(), resolvedUrl.getPath(), null);