少年修仙传客户端基础资源
client_Wu Xijin
2018-11-02 fb75be9a74e190292cace8e21aec3e1b690a5209
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.IO;
 
public class test7zip : MonoBehaviour
{
 
    // Use this for initialization
    void Start()
    {
 
    }
 
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.F))
        {
            var files = new List<FileInfo>();
            FileExtersion.GetAllDirectoryFileInfos(Application.streamingAssetsPath, files);
            foreach (var item in files)
            {
                var fullName = item.FullName;
                if (fullName.EndsWith(".7z"))
                {
                    SevenZipUtility.DeCompress(fullName, Path.GetDirectoryName(fullName));
                    File.Delete(fullName);
                }
            }
        }
    }
}