container-engine/src/main/java/containers/util/FileUtils.java
public static List<Path> diff(final List<Path> newFiles, final Path container) throws IOException{
		// first get a list of jars in the container
		Map<String, Path> containerMap = Files.list(container).filter(f -> f.endsWith(SHA1_EXT)).collect(Collectors.toMap(FileUtils::name, Function.identity(), (k1, k2) -> k1));
		List<Path> toCopy = new ArrayList<>();
		for (Path path : newFiles) {
			if (!containerMap.containsKey(name(path))) {
				toCopy.add(path);
			}
			Path dest = containerMap.remove(name(path));
			if (!areFilesIdenticalMemoryMapped(path, dest)) {
				toCopy.add(path);
			}
		}
		return toCopy;
	}
/**
	 * 
	 * @param newFiles - list of files collected by maven
	 * @param container - container's working dir
	 * @throws IOException 
	 */
@param newFiles - list of files collected by maven
@param container - container's working dir
@throws IOException
@param newFiles - list of files collected by maven @param container - container ' s working dir @throws IOException
public static List<Path> diff(final List<Path> newFiles, final Path container) throws IOException{
		Map<String, Path> containerMap = Files.list(container).filter(f -> f.endsWith(SHA1_EXT)).collect(Collectors.toMap(FileUtils::name, Function.identity(), (k1, k2) -> k1));
		List<Path> toCopy = new ArrayList<>();
		for (Path path : newFiles) {
			if (!containerMap.containsKey(name(path))) {
				toCopy.add(path);
			}
			Path dest = containerMap.remove(name(path));
			if (!areFilesIdenticalMemoryMapped(path, dest)) {
				toCopy.add(path);
			}
		}
		return toCopy;
	}
public static List < Path > diff ( final List < Path > newFiles , final Path container ) throws IOException { Map < String , Path > containerMap = Files . list ( container ) . filter ( f -> f . endsWith ( SHA1_EXT ) ) . collect ( Collectors . toMap ( FileUtils :: name , Function . identity ( ) , ( k1 , k2 ) -> k1 ) ) ; List < Path > toCopy = new ArrayList < > ( ) ; for ( Path path : newFiles ) { if ( ! containerMap . containsKey ( name ( path ) ) ) { toCopy . add ( path ) ; } Path dest = containerMap . remove ( name ( path ) ) ; if ( ! areFilesIdenticalMemoryMapped ( path , dest ) ) { toCopy . add ( path ) ; } } return toCopy ; }
@param newFiles - list of files collected by maven
 @param container - container's working dir
 @throws IOException
@param newFiles - list of files collected by maven @param container - container ' s working dir @throws IOException
// first get a list of jars in the container