std::vector VisibleRect::getFilePathAtVec(std::string filePath)
{
std::vector path_vec;
DIR *dp;
struct dirent *entry;
struct stat statbuf;
int i=0;
if((dp=opendir(filePath.c_str()))==NULL)
{
fprintf(stderr,cannot open %s,filePath.c_str());
exit(1);
}
chdir(filePath.c_str());
while((entry=readdir(dp))!=NULL&&i<255)
{
stat(entry->d_name,&statbuf);
if(!S_ISREG(statbuf.st_mode))
continue;
path_vec.push_back(StringUtils::format(%s,entry->d_name));
}
return path_vec;
}