MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / MountZips

Function MountZips

Engine/source/platform/platformVolume.cpp:102–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102bool MountZips(const String &root)
103{
104 Path basePath;
105 basePath.setRoot(root);
106 Vector<String> outList;
107
108 S32 num = FindByPattern(basePath, "*.zip", true, outList);
109 if(num == 0)
110 return true; // not an error
111
112 S32 mounted = 0;
113 for(S32 i = 0;i < outList.size();++i)
114 {
115 String &zipfile = outList[i];
116#ifdef TORQUE_ZIP_DISK_LAYOUT
117 mounted += (S32)Mount(root, new ZipFileSystem(zipfile, false));
118#else
119 mounted += (S32)Mount(root, new ZipFileSystem(zipfile, true));
120#endif
121 }
122
123 return mounted == outList.size();
124}
125
126//-----------------------------------------------------------------------------
127

Callers 1

MountDefaultsFunction · 0.85

Calls 4

FindByPatternFunction · 0.85
MountFunction · 0.85
setRootMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected