Test for both forward and backward slashes

This commit is contained in:
caheckman 2024-03-26 19:12:56 +00:00
parent d63d35878b
commit b355f9b364
2 changed files with 29 additions and 9 deletions

View file

@ -34,6 +34,7 @@ using std::ostringstream;
class FileManage {
vector<string> pathlist; // List of paths to search for files
static char separator;
static char separatorClass[]; // Characters that can be accepted as a separator
static string buildPath(const vector<string> &pathels,int level);
static bool testDevelopmentPath(const vector<string> &pathels,int level,string &root);
static bool testInstallPath(const vector<string> &pathels,int level,string &root);
@ -42,6 +43,7 @@ public:
void addCurrentDir(void);
void findFile(string &res,const string &name) const; // Resolve full pathname
void matchList(vector<string> &res,const string &match,bool isSuffix) const; // List of files with suffix
static bool isSeparator(char c);
static bool isDirectory(const string &path);
static void matchListDir(vector<string> &res,const string &match,bool isSuffix,const string &dir,bool allowdot);
static void directoryList(vector<string> &res,const string &dirname,bool allowdot=false);