Skip to content

feat: IDirectoryInfo.CopyTo#19

Merged
gigi81 merged 11 commits intoTestableIO:feature/copyto-18from
mayermart:main
Jan 8, 2023
Merged

feat: IDirectoryInfo.CopyTo#19
gigi81 merged 11 commits intoTestableIO:feature/copyto-18from
mayermart:main

Conversation

@mayermart
Copy link
Contributor

Hi,

i implemented a first draft for IDirectoryInfo.CopyTo for recursively copying an IDirecotyInfo to a new path.
There are two possible usages:
IDirectoryInfo IDirectoryInfo.CopyTo(string destDirectoryName, bool recursive) and
IDirectoryInfo IDirectoryInfo.CopyTo(IDirectoryInfo destDirectory, bool recursive)

Please take a look and provide some feedback :-)

This closes #18

Added an Extension Method to IDirectoryInfo to recursively copy a directory.
Added Example for IDirectoryInfo.CopyTo extension
@mayermart mayermart changed the title IDirectoryInfo.CopyTo feat: IDirectoryInfo.CopyTo Apr 1, 2022
@gigi81
Copy link
Collaborator

gigi81 commented Dec 16, 2022

hi @mayermart thanks for your PR. please have a look at my comments

Reordered Methods.
Removed throw if destination exists.
Usage of IFileSystem
@mayermart
Copy link
Contributor Author

Hi @gigi81, thanks for your feedback.
I implemented all your recommendations and reformatted the files for cleaner merge.

Actually i can't remember why i implemented the throw if the destination already exists. Its not even in the template from MS.

@gigi81
Copy link
Collaborator

gigi81 commented Jan 3, 2023

Thanks! Will review later!

@gigi81 gigi81 changed the base branch from main to feature/copyto-18 January 8, 2023 10:30
@gigi81 gigi81 merged commit 287f440 into TestableIO:feature/copyto-18 Jan 8, 2023
@gigi81
Copy link
Collaborator

gigi81 commented Jan 8, 2023

Merging this into a feature branch as there are still some bits I'm not totally convinced and I want to fix before merging into main. Thanks for your contribution

gigi81 added a commit that referenced this pull request Aug 20, 2023
* feat: Add IDirectoryInfo.CopyTo extensions (#19)
* feat: Add ForEachFile, DiffPath, IsAncestorOf extensions
---------
Co-authored-by: Martin <mayermart@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copy Directory recursive

2 participants