code: private static String getRelativePath(File file, FilesystemIterator iterator) throws IOException {
  		String path = file.getPath();
  		String prefix = iterator.getStartPath();
  		if(!path.startsWith(prefix)) throw new IOException("path doesn't start with prefix: path=\""+path+"\", prefix=\""+prefix+"\"");
  		return path.substring(prefix.length());
  	}
docs: Gets the relative path for the provided file from the provided iterator.