package com.qmth.boot.test.tools.zip;

import com.qmth.boot.tools.io.ZipWriter;

import java.io.File;
import java.io.IOException;

public class ZipWriterTest {

    //@Test
    public void test() throws IOException {
        ZipWriter writer = ZipWriter.create(new File("/Users/luoshi/Downloads/test.zip"));
        writer.write("123".getBytes(), "123.txt");
        writer.write("文本内容".getBytes(), "dir1", "文本.txt");
        writer.write(new File("/Users/luoshi/Downloads/cccz.png"), "目录2", "cccz.png");
        writer.write(new File("/Users/luoshi/Downloads/ncu.png"), "图片.png");
        writer.close();
    }
}
