Welcome to MSDN Blogs Sign in | Join | Help

Directory.Move, but not Directory.Copy? [Kit George]

Blane Nelson enquired about Directory.Copy:

Why does the directory object have a static method to move a directory but not one to copy a directory.  Was this an oversite?

I wouldn't call it an oversight necessarily Blane: we explicitly didn't include this functionality on the basis that it's not difficult to code this yourself and the number of varying factors (copy subdirs, throw an exception on first fail, throw an exception if there is A failure, but attempt all copies, etc.) makes a weird decision tree. Rather than get mixed up in that in the past, we simply left it up to you.

However, we are considering doing this in the future. Keep an eye out in Whidbey for an API which provides a DirectoryCopy capability, and we will also be considering other places to include this functionality, post-Whidbey.

Published Monday, January 19, 2004 6:33 PM by BCLTeam

Comments

Thursday, February 19, 2004 12:59 PM by Korby Parnell's WebLog

# System.IO.Directory.Copy()?

Friday, December 03, 2004 12:19 AM by Sajay's Blog

# System.IO.Directory.Copy(...) does not exist

System.IO.Directory.Copy(...) does not exist
New Comments to this post are disabled
 
Page view tracker