- Home /
How do I find a specific file type with getfiles?
In order to let the player import custom components for my game, I'd like to configure it to read data from any CSV they make and place in a dedicated folder. I already have the parser done, so I'm working on actually grabbing the files from an external source and converting them into textassets. I know I can use directory info like this:
DirectoryInfo dataFolder = new DirectoryInfo("Assets/Resources/Data/CSV");
FileInfo[] dataFiles = dataFolder.GetFiles();
However, is there a way to refine root.GetFiles(); to tell it "Only get CSVs"?
Comment
Your answer
Follow this Question
Related Questions
Reading Data from textfile 1 Answer
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Automatic CSV to TXT conversion [solved] 1 Answer
Recommendations for Data Format in C# Project (JSON, XML, Lua, etc) 1 Answer