Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

This may be a dumb question but what is the difference between these two methods.

System.IO.Directory.GetFiles()
System.IO.Directory.GetFileSystemEntries()

They both seem to have the same return values and they both have the same overloads, so I was just wondering if there was somekind of differnce. I'm assuming that there are certain situations where the two methods would return different values, otherwise surely there would only be the need for one of them.

 

NB. Guess this could have gone in the IO thread, but I wasn't sure whether it was that specific.

Anybody looking for a graduate programmer (Midlands, England)?
Posted
Ahh thanks for the response, the reason I ask was that I was comparing the Plug-in code I created during my placement year (about 18 months ago) to the example in the Code Library of these forums. While I'd used GetFiles(), the person who wrote the article had used GetFileSystemEntries(). I'm assuming that since the object of the code is to find dll's then GetFiles() is a perfectly viaible, if not slightly more efficient method (assuming it doesn't encapsulate the other method then eliminate the directories)?
Anybody looking for a graduate programmer (Midlands, England)?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...