示例#1
0
    private Dictionary <string, AbFileInfo> GetLatelyBuildFilesData()
    {
        Dictionary <string, AbFileInfo> ProjectDic = new Dictionary <string, AbFileInfo>();
        string projectFilePath = StreamingAssets + "files.txt";
        string latelyFile      = File.ReadAllText(projectFilePath);

        ProjectDic = AbFileInfo.DeCode(latelyFile);
        return(ProjectDic);
    }
示例#2
0
    private Dictionary <string, AbFileInfo> GetHistoricalFilesData()
    {
        Dictionary <string, AbFileInfo> historocalInfoDic = new Dictionary <string, AbFileInfo>();

        string[] Paths = Directory.GetFiles(SaveHistoricalPath);
        if (Paths.Length < 0)
        {
            return(historocalInfoDic);
        }
        //提取FilesNames
        string TargetFilePath = "";
        long   tempLatelyDate = 0;

        foreach (string ps in Paths)
        {
            string   whileFileName = Path.GetFileNameWithoutExtension(ps);
            string[] sname         = whileFileName.Split('_');
            if (sname.Length < 2)
            {
                continue;
            }
            long timeSpan = long.Parse(sname[1]);
            if (timeSpan > tempLatelyDate)
            {
                tempLatelyDate = timeSpan;
                TargetFilePath = ps;
            }
        }
        if (string.IsNullOrEmpty(TargetFilePath))
        {
            return(historocalInfoDic);
        }
        //解析上一次打包的file文件
        string FileContent = File.ReadAllText(TargetFilePath);

        historocalInfoDic = AbFileInfo.DeCode(FileContent);
        return(historocalInfoDic);
    }