code: public static String getRelativePath(File file, File srcDir) {
  
  		String base = srcDir.getPath();
  		String filePath = file.getPath();
  
  		String relativePath = new File(base).toURI()
  				.relativize(new File(filePath).toURI()).getPath();
  		return relativePath;
  	}
docs: Returns the relative path.
  
  @param file
  @param srcDir
  @return the relative path