System.IO.Directory Methods

Cags

Well-known member
Joined
Feb 19, 2004
Messages
690
Location
Melton Mowbray, England
This may be a dumb question but what is the difference between these two methods.
Code:
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. Im 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 wasnt sure whether it was that specific.
 
GetFiles just return the file names, just like GetDirectories returns a list of Directories.

GetFileSystemEntries returns all Files and Directories.
 
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 Id used GetFiles(), the person who wrote the article had used GetFileSystemEntries(). Im assuming that since the object of the code is to find dlls then GetFiles() is a perfectly viaible, if not slightly more efficient method (assuming it doesnt encapsulate the other method then eliminate the directories)?
 
Back
Top