Skip to content

Copy directory sample: .NET 11 and path mapping fix - #2403

Open
vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/69823-copy-entire-directory-charp
Open

vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/69823-copy-entire-directory-charp

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Retargets files-csharp/CopyAllContentInDirectory to net11.0 with TestableIO.System.IO.Abstractions 23.0.0, MSTest 4.5.3 and Microsoft.NET.Test.Sdk 18.12.0. The copy now maps paths with Path.GetRelativePath and Path.Join instead of string.Replace, creates the destination folder itself, and DeepCopy takes the overwriteFiles flag its usage passes. A small FileSystem.CopyDirectory example is added, and new tests cover a folder name that starts with the source name, a trailing separator, a flat source, an existing file without overwrite, a real-disk DeepCopy and the built-in method's merge and nested-target behaviour.

…y path mapping

Retarget to net11.0, move to TestableIO.System.IO.Abstractions 23.0.0, MSTest 4.5.3 and Microsoft.NET.Test.Sdk 18.12.0. Map paths with Path.GetRelativePath and Path.Join instead of string.Replace, create the destination root, add the overwriteFiles parameter to DeepCopy, add a FileSystem.CopyDirectory example and tests for the new cases.
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.

1 participant