Cags Posted January 12, 2006 Posted January 12, 2006 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. Quote Anybody looking for a graduate programmer (Midlands, England)?
Administrators PlausiblyDamp Posted January 12, 2006 Administrators Posted January 12, 2006 GetFiles just return the file names, just like GetDirectories returns a list of Directories. GetFileSystemEntries returns all Files and Directories. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Cags Posted January 13, 2006 Author Posted January 13, 2006 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)? Quote Anybody looking for a graduate programmer (Midlands, England)?
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.