Changeset 4091 in orxonox.OLD for orxonox/trunk/src/util
- Timestamp:
- May 6, 2005, 8:02:26 PM (20 years ago)
- Location:
- orxonox/trunk/src/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/resource_manager.cc
r4033 r4091 99 99 return false; 100 100 } 101 } 102 103 /** 104 \brief checks for the DataDirectory, by looking if 105 \param fileInside is inisde?? 106 */ 107 bool ResourceManager::checkDataDir(const char* fileInside) 108 { 109 bool retVal; 110 if (!isDir(this->dataDir)) 111 { 112 PRINTF(1)("%s is not a directory\n", this->dataDir); 113 return false; 114 } 115 116 char* testFile = new char[strlen(this->dataDir)+strlen(fileInside)+1]; 117 sprintf(testFile, "%s%s", this->dataDir, fileInside); 118 retVal = isFile(testFile); 119 delete testFile; 120 return retVal; 101 121 } 102 122 -
orxonox/trunk/src/util/resource_manager.h
r4054 r4091 65 65 66 66 bool setDataDir(const char* dataDir); 67 /** \returns the Name of the data directory */ 68 const char* getDataDir(void) {return this->dataDir;} 69 bool checkDataDir(const char* fileInside); 67 70 bool addImageDir(char* imageDir); 68 71 void* load(const char* fileName, ResourcePriority prio = RP_NO,
Note: See TracChangeset
for help on using the changeset viewer.