mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
archive: update TarFilter comments
Docker-DCO-1.1-Signed-off-by: Johan Euphrosine <proppy@google.com> (github: proppy)
This commit is contained in:
parent
5dfe7c43d4
commit
311614952e
1 changed files with 9 additions and 5 deletions
|
@ -6,9 +6,6 @@ import (
|
||||||
"compress/gzip"
|
"compress/gzip"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"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"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
|
@ -17,6 +14,10 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"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 (
|
type (
|
||||||
|
@ -309,8 +310,11 @@ func escapeName(name string) string {
|
||||||
return string(escaped)
|
return string(escaped)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tar creates an archive from the directory at `path`, only including files whose relative
|
// TarFilter creates an archive from the directory at `srcPath` with `options`, and returns it as a
|
||||||
// paths are included in `filter`. If `filter` is nil, then all files are included.
|
// 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) {
|
func TarFilter(srcPath string, options *TarOptions) (io.ReadCloser, error) {
|
||||||
pipeReader, pipeWriter := io.Pipe()
|
pipeReader, pipeWriter := io.Pipe()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue