Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Roof Top Pew Wee

Getting the number of files in Directory.GetFileSystemEntries

This topic is 5311 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

The Directory.GetFileSystemEntries() function in C# returns a string[] filled first with the directories then the files. However, is there a way to know how many directories there are before the files begin? I have looked through the SDK and I can''t find a function like GetNumberOfFiles or GetNumberOfDirectories or anything like that. I am creating a file window and want to know if the highlighted object is a file or directory. --Vic--

Share this post


Link to post
Share on other sites
Advertisement
One solution is win32 API FindFirstFile() and FindNextFile(). I am not familiar with C#, but those are win32 API.

Kuphryn

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!