IPath path = new Path(temp.getFilePath());
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject("此处为项目名");
String relativePath = path.toString().substring(project.getLocation().toString().length() + 1);
IFile file = project.getFile(relativePath);
IFile 与 File 的转换(org.eclipse.core.resources.IFile)
最新推荐文章于 2019-08-29 10:37:00 发布