It seems nobody paid attention but the Javadoc reads:

Returns a platform-neutral string representation of this path. The format is *not specified*, except that the resulting string can be passed back to the |Path#fromPortableString(String)| constructor to produce the exact same path on any platform.

This string is suitable for passing to |Path#fromPortableString(String)|.


-------------------------------------------------------------------------------------------------------

Beside some output to the Logger this method is mainly used in the FileList creation.

While the IntelliJ Version just replace Windows backslashes with slashes the Eclipse Version is a little bit more "powerful" !

http://grepcode.com/file/repo1.maven.org/maven2/org.eclipse.equinox/common/3.6.200-v20130402-1505/org/eclipse/core/runtime/Path.java#Path.toPortableString%28%29

My recommendation would be either: To explicitly describe what a portable path string should look like or drop this method off the IPath interface.

We normally only deal with relative path which even should not contain characters or names that are not valid on certain Operating Systems so there is no need to encode full path drive letters, UNC paths or special characters like, eg. : which is currently what the Eclipse implementation will do.

Any thoughts ?

BR,
Stefan
------------------------------------------------------------------------------
_______________________________________________
DPP-Devel mailing list
DPP-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dpp-devel

Reply via email to