Rename CopyDirectory to CopyDir
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
		| @@ -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) | ||||
| } | ||||
|   | ||||
| @@ -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") | ||||
| 	} | ||||
|  | ||||
|   | ||||
| @@ -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") | ||||
| 	} | ||||
|  | ||||
|   | ||||
| @@ -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") | ||||
| 	} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Derek McGowan
					Derek McGowan