private static String getRelativePathFromOut(final File overflowingFile, final Job job) {
        final URI relativePath = URLUtils.getRelativePath(job.getInputFile(), overflowingFile.toURI());
        final File outputDir = job.getOutputDir().getAbsoluteFile();
        final File outputPathName = new File(outputDir, "index.html");
        final File finalOutFilePathName = resolve(outputDir, relativePath.getPath());
        final File finalRelativePathName = FileUtils.getRelativePath(finalOutFilePathName, outputPathName);
        File parentDir = finalRelativePathName.getParentFile();
        if (parentDir == null || parentDir.getPath().isEmpty()) {
            parentDir = new File(".");
        }
        return parentDir.getPath() + File.separator;
    }
private static String getRelativePathFromOut ( final File overflowingFile , final Job job ) { final URI relativePath = URLUtils . getRelativePath ( job . getInputFile ( ) , overflowingFile . toURI ( ) ) ; final File outputDir = job . getOutputDir ( ) . getAbsoluteFile ( ) ; final File outputPathName = new File ( outputDir , "index.html" ) ; final File finalOutFilePathName = resolve ( outputDir , relativePath . getPath ( ) ) ; final File finalRelativePathName = FileUtils . getRelativePath ( finalOutFilePathName , outputPathName ) ; File parentDir = finalRelativePathName . getParentFile ( ) ; if ( parentDir == null || parentDir . getPath ( ) . isEmpty ( ) ) { parentDir = new File ( "." ) ; } return parentDir . getPath ( ) + File . separator ; }
Just for the overflowing files.
@param overflowingFile overflowingFile
@return relative system path to out which ends in {@link java.io.File#separator File.separator}