static void BuildFileIndex() {
string resPath = AppDataPath + "/StreamingAssets/";
///----------------------创建文件列表-----------------------
string newFilePath = resPath + "/files.txt";
if (File.Exists(newFilePath)) File.Delete(newFilePath);
paths.Clear(); files.Clear();
Recursive(resPath);
FileStream fs = new FileStream(newFilePath, FileMode.CreateNew);
StreamWriter sw = new StreamWriter(fs);
for (int i = 0; i < files.Count; i++) {
string file = files[i];
string ext = Path.GetExtension(file);
if (file.EndsWith(".meta") || file.Contains(".DS_Store")) continue;
string md5 = QUtil.md5file(file);
string value = file.Replace(resPath, string.Empty);
sw.WriteLine(value + "|" + md5);
}
sw.Close(); fs.Close();
}