| | |
| | | var path = StringUtility.Contact(ResourcesPath.Instance.ExternalStorePath, m_RelativePath);
|
| | | var fileInfo = new FileInfo(path);
|
| | |
|
| | | return fileInfo.Exists && fileInfo.Length == size && md5 == FileExtersion.GetMD5HashFromFile(path);
|
| | | if (!fileInfo.Exists)
|
| | | {
|
| | | Debug.LogFormat("文件不存在 {0}", path);
|
| | | return false;
|
| | | }
|
| | | if (fileInfo.Length != size)
|
| | | {
|
| | | Debug.LogFormat("{0}文件大小不对{1}-{2}", path, size, fileInfo.Length);
|
| | | return false;
|
| | | }
|
| | | var fileMD5 = FileExtersion.GetMD5HashFromFile(path);
|
| | | if (fileMD5 != md5)
|
| | | {
|
| | | Debug.LogFormat("{0}文件md5不对{1}-{2}", path, md5, fileMD5);
|
| | | return false;
|
| | | } |
| | | return true;
|
| | | }
|
| | | else
|
| | | {
|