Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm developing a desktop application (a File Manager) in C#.
For copy/cut and paste operations I will use the default methods in .NET like

System.IO.File.Copy()  
System.IO.File.Move()

Are there any limitations of these methods that I should know about ? and if there are, what are the alternatives of these methods ? (win32 API maybe)

share|improve this question
2  
What does the MSDN documentation tell you? –  ChrisF Aug 31 '11 at 8:38
    
doesn't metion any limiations, but doesn't mean there aren't any –  John Aug 31 '11 at 8:40
    
You should take course Epistemology 101. You are asking us to proove that there are no white ravens. –  Ingo Aug 31 '11 at 9:03
add comment

2 Answers 2

up vote 0 down vote accepted

Among the things that you have to watch for:

0-Invalid target path name (characters not allowed, etc.)

1-Long file names for the target path

2-Concurrency problems

3-Target path availability

4-Security

5-File/Directory may be readonly (in case of Cut)

6-Hidden files

share|improve this answer
add comment

There is a known limitation of 259 characters, since .NET Framework does not support UNC paths. In this case, you have to use native calls.

There are probably other limitations, but, well, you have to be more specific in your question, since Programmers.SE is not a place for "do my work for me"-style questions.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.