Click here to Skip to main content
15,892,768 members

Comments by Member 12239906 (Top 5 by date)

Member 12239906 10-May-19 7:04am View    
take it easy my friend, we are here to solve not to make issues,
if you really want me to delete this I'll do that...
Member 12239906 10-May-19 6:01am View    
DirectoryInfo class doesn't actually validate the file path passed to it in the constructor either until the value of the Exists property is retrieved or a method is called that attempts to perform an operation on the file system, this code should not throw a DirectoryNotFound exception before the Exists property is retrieved thus the microsoft example did not incorrectly put the GetDirectories line above the dir.Exists.

To avoid plagiarism I've mentioned the link of microsoft doc in my comments.
Member 12239906 9-May-19 14:29pm View    
here is the question
- How to copy a directory from one location to another using C#
so which one is the right solution ?
all of them just copy contents of the source folder not the source folder itself. do you call this small bug ???

I've copied from microsoft docs from here and changed some parts:
https://docs.microsoft.com/en-us/dotnet/standard/io/how-to-copy-directories
what do you mean by plagiarism ?
thats funny if microsoft call that plagiarism too if I share something from their docs.
Member 12239906 3-May-19 16:22pm View    
you are right dude, but 3 past hours I was searching for a function to copy a directory to another, but I could not find.
I wanted that function copy the source folder itself too and not just contents even recursively.
Member 12239906 29-Nov-18 1:49am View    
It doesn't work yet