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

Method createFileStream

OgreMain/src/OgreRoot.cpp:945–973  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

943 }
944 //---------------------------------------------------------------------
945 DataStreamPtr Root::createFileStream(const String& filename, const String& groupName,
946 bool overwrite, const String& locationPattern)
947 {
948 // Does this file include path specifiers?
949 String path, basename;
950 StringUtil::splitFilename(filename, basename, path);
951
952 // no path elements, try the resource system first
953 DataStreamPtr stream;
954 if (path.empty())
955 {
956 try
957 {
958 stream = ResourceGroupManager::getSingleton().createResource(
959 filename, groupName, overwrite, locationPattern);
960 }
961 catch (...) {}
962
963 }
964
965 if (!stream)
966 {
967 // save direct in filesystem
968 stream = _openFileStream(filename, std::ios::out | std::ios::binary);
969 }
970
971 return stream;
972
973 }
974 //---------------------------------------------------------------------
975 DataStreamPtr Root::openFileStream(const String& filename, const String& groupName)
976 {

Callers 3

serializeMethod · 0.80
saveMethod · 0.80
saveGroupDefinitionMethod · 0.80

Calls 3

_openFileStreamFunction · 0.85
emptyMethod · 0.45
createResourceMethod · 0.45

Tested by

no test coverage detected