refactor: reverting changes no longer needed

This commit is contained in:
Cy Allen Scott 2022-04-22 15:05:47 -04:00
parent 274dfd244d
commit bddf17ba4e

View File

@ -6,7 +6,10 @@ import (
"github.com/spf13/afero"
)
func CreateDir(fs afero.Fs, source, dest string) error {
// CopyDir copies a directory from source to dest and all
// of its sub-directories. It doesn't stop if it finds an error
// during the copy. Returns an error if any.
func CopyDir(fs afero.Fs, source, dest string) error {
// Get properties of source.
srcinfo, err := fs.Stat(source)
if err != nil {
@ -19,18 +22,6 @@ func CreateDir(fs afero.Fs, source, dest string) error {
return err
}
return nil
}
// CopyDir copies a directory from source to dest and all
// of its sub-directories. It doesn't stop if it finds an error
// during the copy. Returns an error if any.
func CopyDir(fs afero.Fs, source, dest string) error {
err := CreateDir(fs, source, dest)
if err != nil {
return err
}
dir, _ := fs.Open(source)
obs, err := dir.Readdir(-1)
if err != nil {