MCPcopy Create free account
hub / github.com/OGRECave/ogre / open

Method open

OgreMain/src/OgreFileSystem.cpp:329–343  ·  view source on GitHub ↗

-----------------------------------------------------------------------

Source from the content-addressed store, hash-verified

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

Callers 2

_openFileStreamFunction · 0.45
createMethod · 0.45

Calls 3

isReadOnlyFunction · 0.85
_openFileStreamFunction · 0.85
concatenate_pathFunction · 0.85

Tested by

no test coverage detected