Exemplo n.º 1
0
    private static void PutStreamToZip(string fileNameExtention, ZipOutputStream zipStream, Stream stream)
    {
        ZipEntry zipEntry = new ZipEntry(AppLog.GenerateNewFileName(fileNameExtention))
        {
            DateTime = DateTime.Now
        };

        zipStream.PutNextEntry(zipEntry);
        StreamUtils.Copy(stream, zipStream, new byte[4096]);
        zipStream.CloseEntry();
        stream.Close();
        stream.Dispose();
    }
Exemplo n.º 2
0
 private static string GenerateNewFilePath(string extension)
 {
     return(string.Format("{0}/{1}", Application.persistentDataPath, AppLog.GenerateNewFileName(extension)));
 }