org.jicengine.io
Class PathResolver

java.lang.Object
  extended byorg.jicengine.io.PathResolver

public class PathResolver
extends java.lang.Object

Author:
.timo

Constructor Summary
PathResolver()
           
 
Method Summary
static java.lang.String getPathOf(java.io.File file)
           
static java.lang.String getRealPath(java.lang.String contextPath, java.lang.String relativePath)
           Forms a real path from a base-path and a relative path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathResolver

public PathResolver()
Method Detail

getRealPath

public static java.lang.String getRealPath(java.lang.String contextPath,
                                           java.lang.String relativePath)

Forms a real path from a base-path and a relative path.

For example,
'/directory/file1.txt' + 'file2.txt' -> '/directory/file2.txt'
'/directory/file1.txt' + '../file2.txt' -> '/file2.txt'
'/directory/subdir/' + 'file2.txt' -> '/directory/subdir/file2.txt'
'/directory/file1.txt' + 'subdir/' -> '/directory/subdir/'

Parameters:
contextPath -
relativePath -

getPathOf

public static java.lang.String getPathOf(java.io.File file)