org.jumpmind.symmetric.fs.util
Class Utils

java.lang.Object
  extended by org.jumpmind.symmetric.fs.util.Utils

public final class Utils
extends Object


Method Summary
static String getRelativePath(File target, File base)
           
static String getRelativePath(String targetPath, String basePath)
           
static String getRelativePath(String targetPath, String basePath, String pathSeparator)
          Get the relative path from one file to another, specifying the directory separator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRelativePath

public static String getRelativePath(File target,
                                     File base)

getRelativePath

public static String getRelativePath(String targetPath,
                                     String basePath)

getRelativePath

public static String getRelativePath(String targetPath,
                                     String basePath,
                                     String pathSeparator)
Get the relative path from one file to another, specifying the directory separator. If one of the provided resources does not exist, it is assumed to be a file unless it ends with '/' or '\'.

Parameters:
targetPath - targetPath is calculated to this file
basePath - basePath is calculated from this file
pathSeparator - directory separator. The platform default is not assumed so that we can test Unix behaviour when running on Windows (for example)


Copyright © 2012-2013 JumpMind, Inc.. All Rights Reserved.