U3D调用7z解压文件
2014-06-23 15:48
330 查看
using UnityEngine; using System; using System.IO; using System.Diagnostics; public class Test : MonoBehaviour { //7z程序的程序目录 private string _7zExeUrl ; void Start() { _7zExeUrl = Application.dataPath + "/StreamingAssets/7z.exe"; DecompressFileToDirectory(Application.dataPath + "/StreamingAssets/test.zip", Application.dataPath + "/StreamingAssets/"); } public void DecompressFileToDirectory(string inFileath, string outFilePath) { try { Process process = new Process(); string info = " x " + inFileath + " -o" + outFilePath + " -r "; ProcessStartInfo startInfo = new ProcessStartInfo(_7zExeUrl, info); process.StartInfo = startInfo; //隐藏DOS窗口 process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; process.Start(); process.WaitForExit(); process.Close(); } catch (Exception e) { UnityEngine.Debug.Log(e); } } }
/article/3640391.html
相关文章推荐
- Delphi 7zip 示例调用7z.dll 压缩及解压.7z文件
- Unity3D调用7z解压文件
- SSIS基本应用--进程任务(调用WinRar解压文件)
- 调用WinRAR解压文件
- 【MFC】VC调用WinRar解压文件(如:.gz)
- 解压7z文件windows代码.
- C#使用SharpZipLib压缩和解压文件3/3调用实现压缩和解压
- ubuntu下7z文件的解压方法(转载)
- Ubuntu Linux 安装 .7z 解压和压缩文件
- c#调用7z压缩和解压缩文件
- 7z格式多卷压缩文件使用winRAR解压…
- 用C#调用Windows API压缩,解压文件
- C#调用rar.exe解压一个rar文件
- 解压7z文件windows代码.
- ubuntu下7z文件的解压方法
- ubuntu 7z 文件 解压
- Ubuntu下解压7z文件
- 一个通过不同的文件扩展名来调用不同的解压程序的shell脚本
- ubuntu下7z文件的解压方法
- Linux 下压缩与解压.zip和.rar及.7z文件