public static void Copy(this IFileSystemOperator fileSystemOperator, string sourcePath, string destinationPath, bool overwrite = true) { fileSystemOperator.FileOrDirectorySwitch(sourcePath, () => fileSystemOperator.CopyFile(sourcePath, destinationPath, overwrite), () => fileSystemOperator.CopyDirectory(sourcePath, destinationPath)); }