Changeset 9324 in orxonox.OLD for branches/terrain/src/lib/util/filesys/file.cc
- Timestamp:
- Jul 18, 2006, 12:04:54 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/terrain/src/lib/util/filesys/file.cc
r8619 r9324 155 155 } 156 156 157 bool File::open(OpenMode mode) 158 { 159 #warning implement 160 return false; 157 bool File::open( OpenMode mode ) 158 { 159 static const char* openModeStrings[] = { 160 "r", "w", "r+", "a+" }; 161 _mode = mode; 162 _handle = fopen( name().c_str(), openModeStrings[mode] ); 163 return ( _handle != NULL ); 161 164 } 162 165 163 166 bool File::close() 164 167 { 165 #warning implement 166 return false; 168 if ( _handle != NULL ) { 169 int success = fclose( _handle ); 170 _handle = NULL; 171 return ( success == 0 ); 172 } 173 return false; 167 174 } 168 175
Note: See TracChangeset
for help on using the changeset viewer.