import *.FileHelper;

public class test {

    public static void main(String[] args) {
        String srcPath = "/Users/baosenzhang/Downloads/CovPreData_1/test.zip";
        String temp = "/Users/baosenzhang/Downloads/CovEndData_1/";
        FileHelper.unzip(srcPath, temp, srcPath);
    }
}

                //beginIndex=-1时说明文件名中不包含.xxx的文件后缀名
                int beginIndex = entryFile.getAbsolutePath().lastIndexOf(".");
                // 如果文件待.sh或者没有后缀名,给赋一个可执行权限
                if(entryFile.getAbsolutePath().endsWith(".sh") || beginIndex == -1){
                    entryFile.setExecutable(true);
                }
Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐