191 |
|
|
192 |
return path.substring(pos + File.separator.length()); |
return path.substring(pos + File.separator.length()); |
193 |
} |
} |
194 |
|
|
195 |
|
/** |
196 |
|
* This method returns a canonical representation of the pathname of |
197 |
|
* this file. The actual form of the canonical representation is |
198 |
|
* different. On the GNU system, the canonical form differs from the |
199 |
|
* absolute form in that all relative file references to "." and ".." |
200 |
|
* are resolved and removed. |
201 |
|
* <p> |
202 |
|
* Note that this method, unlike the other methods which return path |
203 |
|
* names, can throw an IOException. This is because native method |
204 |
|
* might be required in order to resolve the canonical path |
205 |
|
* |
206 |
|
* @exception IOException If an error occurs |
207 |
|
*/ |
208 |
|
public String toCanonicalForm(String path) throws IOException |
209 |
|
{ |
210 |
|
// FIXME: this only works on UNIX |
211 |
|
return PlatformHelper.toCanonicalForm(path); |
212 |
|
} |
213 |
} |
} |