Rename CopyDirectory to CopyDir

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
Derek McGowan 2017-02-03 12:08:53 -08:00
parent d96e6e3952
commit aaf18b5962
4 changed files with 6 additions and 6 deletions

View File

@ -17,9 +17,9 @@ var (
}
)
// CopyDirectory copies the directory from src to dst.
// CopyDir copies the directory from src to dst.
// Most efficient copy of files is attempted.
func CopyDirectory(dst, src string) error {
func CopyDir(dst, src string) error {
inodes := map[uint64]string{}
return copyDirectory(dst, src, inodes)
}

View File

@ -45,7 +45,7 @@ func testCopy(apply fstest.Applier) error {
return errors.Wrap(err, "failed to apply changes")
}
if err := CopyDirectory(t2, t1); err != nil {
if err := CopyDir(t2, t1); err != nil {
return errors.Wrap(err, "failed to copy")
}

View File

@ -164,7 +164,7 @@ func testDiffWithBase(base, diff fstest.Applier, expected []testChange) error {
return errors.Wrap(err, "failed to apply base filesytem")
}
if err := CopyDirectory(t2, t1); err != nil {
if err := CopyDir(t2, t1); err != nil {
return errors.Wrap(err, "failed to copy base directory")
}

View File

@ -66,7 +66,7 @@ func (n *Naive) Prepare(dst, parent string) ([]containerd.Mount, error) {
}
// Now, we copy the parent filesystem, just a directory, into dst.
if err := fs.CopyDirectory(dst, filepath.Join(parent, "data")); err != nil {
if err := fs.CopyDir(dst, filepath.Join(parent, "data")); err != nil {
return nil, errors.Wrap(err, "copying of parent failed")
}
}
@ -88,7 +88,7 @@ func (n *Naive) Commit(diff, dst string) error {
// Move the data into our metadata directory, we could probably save disk
// space if we just saved the diff, but let's get something working.
if err := fs.CopyDirectory(filepath.Join(active.metadata, "data"), dst); err != nil {
if err := fs.CopyDir(filepath.Join(active.metadata, "data"), dst); err != nil {
return errors.Wrap(err, "copying of parent failed")
}