TestableIO / System.IO.Abstractions.Extensions

Convenience functionality on top of System.IO.Abstractions
MIT License
20 stars 6 forks source link

feat: IDirectoryInfo.CopyTo #19

Closed mayermart closed 1 year ago

mayermart commented 2 years ago

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

gigi81 commented 1 year ago

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

mayermart commented 1 year ago

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 commented 1 year ago

Thanks! Will review later!

gigi81 commented 1 year ago

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