Here you can find the source of getCanonicalPath(IPath fullPath)
public static IPath getCanonicalPath(IPath fullPath)
//package com.java2s; /******************************************************************************* * Copyright (c) 2004, 2009 QNX Software Systems and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors://w ww . j a v a 2 s . c o m * QNX Software Systems - initial API and implementation * Markus Schorn (Wind River Systems) *******************************************************************************/ import java.io.File; import java.io.IOException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; public class Main { public static IPath getCanonicalPath(IPath fullPath) { File file = fullPath.toFile(); try { String canonPath = file.getCanonicalPath(); return new Path(canonPath); } catch (IOException ex) { } return null; } }