From 311614952ea64315075d827c880debbdfb503640 Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Fri, 16 May 2014 12:44:42 -0700 Subject: [PATCH] archive: update TarFilter comments Docker-DCO-1.1-Signed-off-by: Johan Euphrosine (github: proppy) --- archive/archive.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/archive/archive.go b/archive/archive.go index e21b10ca0c..a22da4ee57 100644 --- a/archive/archive.go +++ b/archive/archive.go @@ -6,9 +6,6 @@ import ( "compress/gzip" "errors" "fmt" - "github.com/dotcloud/docker/pkg/system" - "github.com/dotcloud/docker/utils" - "github.com/dotcloud/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" "io" "io/ioutil" "os" @@ -17,6 +14,10 @@ import ( "path/filepath" "strings" "syscall" + + "github.com/dotcloud/docker/pkg/system" + "github.com/dotcloud/docker/utils" + "github.com/dotcloud/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" ) type ( @@ -309,8 +310,11 @@ func escapeName(name string) string { return string(escaped) } -// Tar creates an archive from the directory at `path`, only including files whose relative -// paths are included in `filter`. If `filter` is nil, then all files are included. +// TarFilter creates an archive from the directory at `srcPath` with `options`, and returns it as a +// stream of bytes. +// +// Files are included according to `options.Includes`, default to including all files. +// Stream is compressed according to `options.Compression', default to Uncompressed. func TarFilter(srcPath string, options *TarOptions) (io.ReadCloser, error) { pipeReader, pipeWriter := io.Pipe()