#ifndef _COMMON_PATHFIND_HPP_ #define _COMMON_PATHFIND_HPP_ #ifndef _COMMON_WINDOWS_HPP_ #include #endif #ifndef _COMMON_STRING_HPP_ #include #endif #ifndef _COMMON_BLOCK_HPP_ #include #endif #ifndef _COMMON_FINDDATA_HPP_ #include #endif class PathFind { public: PathFind(void); virtual ~PathFind(); WORD findFile(const String &pureFileName,String &pathFileName); WORD dirList(String pathEntry,Block &subDirList); WORD fileList(String pathFileSpec,Block &entryList); WORD getWindowsDirectory(String &windowsDirectoryString); WORD getSystemDirectory(String &systemDirectoryString); BOOL getWindowsTempDirectory(String &windowsTempDirectory); BOOL getTempFileName(String &strPathTempFileName,const String &strPrefix=String()); private: enum {BackSlash='\\',ForwardSlash='/',Dot='.'}; WORD getPathBlock(void); WORD searchPath(String pathEntry,String pureFileName,String &pathFileName); WORD searchPathTranscend(String pathEntry,String pureFileName,String &pathFileName); WORD getPathTranscend(String pathEntry,Block &pathFileName); WORD getDirectoryFileEntries(String pathEntry,Block &entryStrings); WORD getDirEntries(String pathEntryFileSpec,Block &entryStrings); WORD canTranscend(String &pathEntry); void fixupPathName(String &pathEntry); WORD isFile(const String &pathFileName); WORD getWinDir(String &winDirString); WORD getCurrDir(String &currDirString); void subList(Block &subDirList,String pathEntry); WORD isDirectory(FindData &findData); BOOL hasWildCard(String &pathFileSpec)const; BOOL hasPath(String &pathFileSpec)const; void insertPath(String &pathFileSpec)const; FindData mFindData; Block mPathEntry; String mUpDirString; String mCurrDirString; String mBackSlashString; String mStarDotStarString; String mStarString; String mPathString; String mSemicolonString; String mWinDirString; WORD mIsOkay; }; #endif