MCPcopy Create free account
hub / github.com/MailCore/mailcore2 / CreateTemporaryZipFileFromFolder

Method CreateTemporaryZipFileFromFolder

src/core/zip/MCZip.cpp:182–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180#endif
181
182String * mailcore::CreateTemporaryZipFileFromFolder(String * folder)
183{
184 String * tempDirectoryString = TemporaryDirectoryForZip();
185
186 if (tempDirectoryString == NULL) {
187 return NULL;
188 }
189
190 String * path = tempDirectoryString->stringByAppendingPathComponent(folder->lastPathComponent())->stringByAppendingUTF8Format(".zip");
191
192 ErrorCode err = CreateZipFileFromFolder(path, folder);
193 if (err != ErrorNone) {
194 return NULL;
195 }
196 unlink(tempDirectoryString->fileSystemRepresentation());
197
198 return path;
199}
200
201void mailcore::RemoveTemporaryZipFile(String * zipFilename)
202{

Callers

nothing calls this directly

Tested by

no test coverage detected