diff --git a/cli/internal/fs/recursive_copy_rust.go b/cli/internal/fs/recursive_copy.go similarity index 100% rename from cli/internal/fs/recursive_copy_rust.go rename to cli/internal/fs/recursive_copy.go diff --git a/cli/internal/fs/recursive_copy_go.go b/cli/internal/fs/recursive_copy_go.go deleted file mode 100644 index baa60d2a8387c..0000000000000 --- a/cli/internal/fs/recursive_copy_go.go +++ /dev/null @@ -1,38 +0,0 @@ -//go:build go || !rust -// +build go !rust - -package fs - -import ( - "os" - "path/filepath" - - "github.com/vercel/turbo/cli/internal/turbopath" -) - -// RecursiveCopy copies either a single file or a directory. -func RecursiveCopy(from turbopath.AbsoluteSystemPath, to turbopath.AbsoluteSystemPath) error { - // Verified all callers are passing in absolute paths for from (and to) - statedFrom := LstatCachedFile{Path: from} - fromType, err := statedFrom.GetType() - if err != nil { - return err - } - - if fromType.IsDir() { - return WalkMode(statedFrom.Path.ToStringDuringMigration(), func(name string, isDir bool, fileType os.FileMode) error { - dest := filepath.Join(to.ToStringDuringMigration(), name[len(statedFrom.Path.ToString()):]) - // name is absolute, (originates from godirwalk) - src := LstatCachedFile{Path: UnsafeToAbsoluteSystemPath(name), fileType: &fileType} - if isDir { - mode, err := src.GetMode() - if err != nil { - return err - } - return os.MkdirAll(dest, mode) - } - return CopyFile(&src, dest) - }) - } - return CopyFile(&statedFrom, to.ToStringDuringMigration()) -}