aboutsummaryrefslogtreecommitdiff
path: root/src/plugin/pluginmgr_dl.cpp
blob: 337fa99354659943553b272367f3ab61c2143ca9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <dlfcn.h>
#include <dirent.h>
#include <cstring>
#include "pluginmgr.hpp"
pluginManager::pluginManager()
{
	strcpy(pluginFolder,"./plugins");
}
void pluginManager::scanPlugin()
{
	DIR *dir;
	struct dirent *file;
	if((dir=opendir(pluginFolder)))
	{
		while((file=readdir(dir)))
		//puts(file->d_name);
		if(strcmp(file->d_name+strlen(file->d_name)-3,".so")==0)
			strcpy(fn[fcnt++],file->d_name);
		closedir(dir);
	}
}