diff --git a/xml/System.IO/Directory.xml b/xml/System.IO/Directory.xml index 3e1a4800368..0c518d2e7b0 100644 --- a/xml/System.IO/Directory.xml +++ b/xml/System.IO/Directory.xml @@ -3468,7 +3468,10 @@ Directory::CreateDirectory("Public\\Html"); Trailing spaces are removed from the end of the path parameters before moving the directory. For a list of common I/O tasks, see [Common I/O Tasks](~/docs/standard/io/common-i-o-tasks.md). - + + +> [!NOTE] +> Starting with .NET Core 3.0, the `Move` method throws an in all platforms when the `destDirName` already exists. In .NET Core 2.2 and previous versions, the exception was only thrown on Windows, and other platforms could either fail or overwrite the `destDirName`. See [C++ rename](https://linux.die.net/man/2/rename). ## Examples @@ -3476,14 +3479,14 @@ Directory::CreateDirectory("Public\\Html"); [!code-csharp[System.IO.Directory#14](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.IO.Directory/CS/class6.cs#14)] [!code-vb[System.IO.Directory#14](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.IO.Directory/VB/class6.vb#14)] - + ]]> - An attempt was made to move a directory to a different volume. + An attempt was made to move a directory to a different volume. -or- - already exists. + already exists. See the Note in the Remarks section. -or- @@ -4143,4 +4146,4 @@ Directory::CreateDirectory("Public\\Html"); - \ No newline at end of file +