| 180 | #endif |
| 181 | |
| 182 | String * 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 | |
| 201 | void mailcore::RemoveTemporaryZipFile(String * zipFilename) |
| 202 | { |
nothing calls this directly
no test coverage detected