Himall商城Zip帮助类UnZipFile解压Zip文件

 public static ZipInfo UnZipFile(string zipFilePath)
        {
            string path = zipFilePath.Replace(Path.GetExtension(zipFilePath), string.Empty) + "_" + System.DateTime.Now.ToString("yyyyMMddHHmmssfff");
            string directoryName = string.Empty;
            string fileName = string.Empty;
            using (Ionic.Zip.ZipFile zip = Ionic.Zip.ZipFile.Read(Path.Combine(zipFilePath)))
            {
                foreach (Ionic.Zip.ZipEntry entry in zip)
                {
                    directoryName = Path.GetDirectoryName(entry.FileName);

                    // create directory
                    if (directoryName.Length > 0)
                    {
                        directoryName = Path.Combine(path, directoryName);
                        if (!Directory.Exists(directoryName))
       

你可能感兴趣的:(himall商城,java,服务器,javascript)