- Timestamp:
- May 12, 2006, 4:19:06 PM (19 years ago)
- Location:
- branches/qt_gui/src/lib/util
- Files:
-
- 2 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 { -
branches/qt_gui/src/lib/util/file.h
r7611 r7612 54 54 private: 55 55 int _handle; //!< The FileHandle (if set). 56 std::string name; //!< The Name of the File.56 std::string _name; //!< The Name of the File. 57 57 58 58 static std::string _cwd; //!< The currend Working directory.
Note: See TracChangeset
for help on using the changeset viewer.