Example #1
0
    /// <summary>
    /// 删除对比文件
    /// </summary>
    public static void RemoveLocalCompareFile()
    {
        string filePath = ABSettings.LocalCompareFilePath();

        try
        {
            File.Delete(filePath);
            ABUtil.Log("Delete AB Compare File Success");
        }
        catch (Exception e) {
            ABUtil.Log(e.Message);
        }
    }
Example #2
0
    /// <summary>
    /// 读取本地Local文件的比较文件
    /// </summary>
    public static void ReadABCompareFile()
    {
        ABHashCollection abHashCollection = new ABHashCollection();
        string           filePath         = ABSettings.LocalCompareFilePath();

        try
        {
            FileStream   fs           = new FileStream(filePath, FileMode.Open);
            StreamReader streamReader = new StreamReader(fs);

            string jsonStr = streamReader.ReadToEnd();
            ABUtil.Log("read jsonStr: " + jsonStr);
            streamReader.Close();
            fs.Close();
        }
        catch (Exception e)
        {
            ABUtil.Log(e.Message);
        }
    }