hio_helper.cpp
Go to the documentation of this file.
1 /** @file hio_helper.cpp Helpers for the hiosys plugin */
2 
3 #include "hio_helper.h"
4 
5 // Get a list of the files and folders in a given path
6 std::vector<std::string> ListFolderContent(const char* pPath) {
7 
8  std::vector<std::string> mList;
9  DIR *d;
10  dirent *de=NULL;
11 
12  if((d=opendir(pPath))!=NULL)
13  {
14  char *name;
15  while((de=readdir(d)))
16  {
17  name=de->d_name;
18  // don't insert in the result list '.' and '..'
19  if(!(!(name[0]!='.'&&name[1]!='\0')|| !(name[0]!='.'&&name[1]!='.'&&name[2]!='\0')))
20  mList.push_back(de->d_name);
21  }
22  closedir(d);
23  }
24 
25 return mList;
26 }

libFAUDES 2.24g --- 2014.09.15 --- c++ api documentaion by doxygen