cz.cuni.amis.utils
Class FilePath

Package class diagram package FilePath
java.lang.Object
  extended by cz.cuni.amis.utils.FilePath

public class FilePath
extends Object


Field Summary
static String CLASSPATH_SEPARATOR
          Seperator of the classpath entries.
 
Constructor Summary
FilePath()
           
 
Method Summary
static void checkRelativePath(String path)
          Checks the 'path' for the presence of ".." + can't start with "/" + enforces use of the ALLOWED_RELATIVE_PATH_CHARS.
static String concatPaths(String... paths)
          Concats all paths sequentially together replacing all backslashes with slashes and watches out for ending of the path1 and beginning of path2 solving "//", "/./", etc.
static String concatPaths(String path1, String path2)
          Concats path1 and path2 replacing all backslashes with slashes and watches out for ending of the path1 and beginning of path2 solving "//", "/./", etc.
static void makeDirsToFile(File file)
          Treats 'file' as something that points to the file and creates all parent dirs.
static String makeUniform(String file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASSPATH_SEPARATOR

public static final String CLASSPATH_SEPARATOR
Seperator of the classpath entries.

See Also:
Constant Field Values
Constructor Detail

FilePath

public FilePath()
Method Detail

checkRelativePath

public static void checkRelativePath(String path)
Checks the 'path' for the presence of ".." + can't start with "/" + enforces use of the ALLOWED_RELATIVE_PATH_CHARS.

Parameters:
path -

makeDirsToFile

public static void makeDirsToFile(File file)
Treats 'file' as something that points to the file and creates all parent dirs.

Parameters:
file -

concatPaths

public static String concatPaths(String... paths)
Concats all paths sequentially together replacing all backslashes with slashes and watches out for ending of the path1 and beginning of path2 solving "//", "/./", etc. Does not resolves "..".

Parameters:
paths -
Returns:

concatPaths

public static String concatPaths(String path1,
                                 String path2)
Concats path1 and path2 replacing all backslashes with slashes and watches out for ending of the path1 and beginning of path2 solving "//", "/./", etc. Does not resolves "..".

Parameters:
path1 -
path2 -
Returns:

makeUniform

public static String makeUniform(String file)


Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.