-----------------------------------------------------------------------
| 327 | } |
| 328 | //----------------------------------------------------------------------- |
| 329 | DataStreamPtr FileSystemArchive::open(const String& filename, bool readOnly) const |
| 330 | { |
| 331 | if (!readOnly && isReadOnly()) |
| 332 | { |
| 333 | OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Cannot open a file in read-write mode in a read-only archive"); |
| 334 | } |
| 335 | |
| 336 | // Always open in binary mode |
| 337 | // Also, always include reading |
| 338 | std::ios::openmode mode = std::ios::in | std::ios::binary; |
| 339 | |
| 340 | if(!readOnly) mode |= std::ios::out; |
| 341 | |
| 342 | return _openFileStream(concatenate_path(mName, filename), mode, filename); |
| 343 | } |
| 344 | DataStreamPtr _openFileStream(const String& full_path, std::ios::openmode mode, const String& name) |
| 345 | { |
| 346 | // Use filesystem to determine size |
no test coverage detected