/**
 * Copyright (C) 2014 SignalFuse, Inc.
 */
package com.github.dockerjava.core;

import java.io.File;
import java.util.List;

import org.apache.commons.io.filefilter.AbstractFileFilter;

public class GoLangMatchFileFilter extends AbstractFileFilter {

	private final File base;
	
    private final List<String> patterns;


    public GoLangMatchFileFilter(File base, List<String> patterns) {
        super();
        this.base = base;
        this.patterns = patterns;
    }

    @Override
    public boolean accept(File file) {
    	String relativePath = file.getAbsolutePath().replaceFirst(base.getAbsolutePath() + File.separatorChar, "");
    	
    	boolean match = GoLangFileMatch.match(patterns, relativePath);
        return !match;
    }


}

@@ -77,16 +77,79 @@
 .core;%0A%0A
+import static org.apache.commons.lang.StringUtils.stripStart;%0A%0A
 import j
@@ -596,31 +596,30 @@
     
-%09
+    
 String 
-relativ
+bas
 ePath = 
 file
@@ -614,19 +614,19 @@
 ePath = 
-fil
+bas
 e.getAbs
@@ -640,83 +640,124 @@
 th()
-.replaceFirst(base.getAbsolutePath() + File.separatorChar, %22%22);%0A    %09%0A
+ + File.separatorChar;%0A        String relativePath = stripStart(file.getAbsolutePath(), basePath);%0A        %0A  
     
-%09
+  
 bool

Make GoLangMatchFileFilter work on Windows