Changeset 7612 in orxonox.OLD for branches/qt_gui/src/lib/util/file.cc
- Timestamp:
- May 12, 2006, 4:19:06 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/qt_gui/src/lib/util/file.cc
r7611 r7612 73 73 bool File::isDirectory() 74 74 { 75 std::string tmpDirName = this->_name; 76 struct stat status; 77 78 // checking for the termination of the string given. If there is a "/" at the end cut it away 79 if (directoryName[directoryName.size()-1] == '/' || 80 directoryName[directoryName.size()-1] == '\\') 81 { 82 tmpDirName.erase(tmpDirName.size()-1); 83 } 84 85 if(!stat(tmpDirName.c_str(), &status)) 86 { 87 if (status.st_mode & (S_IFDIR 88 #ifndef __WIN32__ 89 | S_IFLNK 90 #endif 91 )) 92 { 93 return true; 94 } 95 else 96 return false; 97 } 98 else 99 return false; 100 } 101 102 bool File::isReadeable() 103 { 104 75 105 #warning implement 76 106 } 77 bool File::isReadeable() 78 { 79 #warning implement 80 } 107 81 108 bool File::isWriteable() 82 109 {
Note: See TracChangeset
for help on using the changeset viewer.