mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-03 00:39:02 +00:00
Implement Script Downloading and parsing of the Informations.
To-Do: Revision checking of the current and new Scripts.
This commit is contained in:
@@ -159,4 +159,16 @@ void getDirectoryContents(std::vector<DirEntry>& dirContents, const std::vector<
|
||||
|
||||
void getDirectoryContents(std::vector<DirEntry>& dirContents) {
|
||||
getDirectoryContents(dirContents, {});
|
||||
}
|
||||
|
||||
std::vector<std::string> getContents(const std::string &name, const std::vector<std::string> &extensionList) {
|
||||
std::vector<std::string> dirContents;
|
||||
DIR* pdir = opendir(name.c_str());
|
||||
struct dirent *pent;
|
||||
while ((pent = readdir(pdir)) != NULL) {
|
||||
if(nameEndsWith(pent->d_name, extensionList))
|
||||
dirContents.push_back(pent->d_name);
|
||||
}
|
||||
closedir(pdir);
|
||||
return dirContents;
|
||||
}
|
||||
Reference in New Issue
Block a user