//removePath将要删除的路径
static public string GetFileListXMLString(List <string> fileList, string removePath)
{
var root = new System.Security.SecurityElement("root");
foreach (var item in fileList)
{
string fileName = Path.GetFileName(item);
string ext = Path.GetExtension(item);
if (string.Compare(ext, ".meta", true) == 0)
{
continue;
}
string filePath = null;
if (IsUseAssetBundle)
{
filePath = item.Replace(removePath, "");
root.AddChild(new System.Security.SecurityElement("k", fileName.ToLower()));
root.AddChild(new System.Security.SecurityElement("v", filePath.ToLower()));
}
else
{
filePath = item.Replace(removePath, "");
root.AddChild(new System.Security.SecurityElement("k", fileName));
root.AddChild(new System.Security.SecurityElement("v", filePath));
}
}
return(root.ToString());
}