hio_helper.cppGo to the documentation of this file.00001 /** @file hio_helper.cpp Helpers for the hiosys plugin */ 00002 00003 #include "hio_helper.h" 00004 00005 // Get a list of the files and folders in a given path 00006 std::vector<std::string> ListFolderContent(const char* pPath) { 00007 00008 std::vector<std::string> mList; 00009 DIR *d; 00010 dirent *de=NULL; 00011 00012 if((d=opendir(pPath))!=NULL) 00013 { 00014 char *name; 00015 while((de=readdir(d))) 00016 { 00017 name=de->d_name; 00018 // don't insert in the result list '.' and '..' 00019 if(!(!(name[0]!='.'&&name[1]!='\0')|| !(name[0]!='.'&&name[1]!='.'&&name[2]!='\0'))) 00020 mList.push_back(de->d_name); 00021 } 00022 closedir(d); 00023 } 00024 00025 return mList; 00026 } libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen |