Skip to content

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

Merged
vladimir-pecanac-main merged 2 commits into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/69823-copy-entire-directory-charp
Nov 19, 2026
Merged

vladimir-pecanac-main merged 2 commits 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.
@vladimir-pecanac-main
vladimir-pecanac-main merged commit 24aebd3 into CodeMazeBlog:main Nov 19, 2026
4 checks passed
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