Class RelativPath


  • public class RelativPath
    extends Object
    • Constructor Detail

      • RelativPath

        public RelativPath()
    • Method Detail

      • getRelativeFile

        public static File getRelativeFile​(File target,
                                           File base)
                                    throws IOException
        Returns the path of one File relative to another.
        copy'n'paste from @see stackoverflow.com/a/1269907
        Parameters:
        target - the target directory
        base - the base directory
        Returns:
        target's path relative to the base directory
        Throws:
        IOException - if an error occurs while resolving the files' canonical names