Thursday, 20 August 2015

Converting org.eclipse.emf.common.util.URI to Java.io.File



Code snippet:

URI resolvedFile = CommonPlugin.resolve(uri);
String fileString = resolvedFile.toFileString();
File file = new File(fileString);

Thats it. You have got the File now.

org.eclipse.emf.common.CommonPlugin - Include this in your import and manifest.

No comments:

Post a Comment

Gallery

Object Oritented, Git

Most Commented

OOAD

Contact Form

Name

Email *

Message *

2014 © Planer - Responsive Blogger Magazine Theme
Planer theme by Way2themes