Пример #1
0
 public FilesChecker(string codeFolder = "", CodeType codeType = CodeType.Md5)
 {
     m_saveCodeFolder = codeFolder;
     m_CheckCodeType  = codeType;
     if (m_saveCodeFolder != "")
     {
         if (!XFolderTools.Exists(m_saveCodeFolder))
         {
             XFolderTools.CreateDirectory(m_saveCodeFolder);
         }
     }
 }
Пример #2
0
        private string GetFolderCode(string folderPath)
        {
            //遍历文件夹,遍历所有文件Code
            List <string> filePaths = new List <string>();

            XFolderTools.TraverseFiles(folderPath, (fullPath) =>
            {
                string path = Path.GetDirectoryName(fullPath);
                filePaths.Add(path);
            }, true);

            string codes = GetFilesCode(filePaths.ToArray());

            return(codes);
        }