⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 common.h

📁 Windows环境下不同文件夹下文件的比较、合并
💻 H
字号:
/*********************************************************************
File Name		:	Common.h
Discription		:	Define common macro/struct
					Delcare common function

Author			:	Chenel
Date			:	2005/10/22
*********************************************************************/

#ifndef __COMMON_H__
#define __COMMON_H__
/*********************************************************************

	Macro define section

*********************************************************************/

#define		SUCCESS		(0)
#define		FAILURE		(1)
#define		NULSTRING	_T("")

#define		FILEFINDTYPE_ALL	_T("\\*.*")
#define		FILEPATHFLG			_T("\\")

#define		OPTYPE_NONE						(0)
#define		OPTYPE_GETALLSUBFILE			(1)
#define		OPTYPE_DELSAMEFILE				(2)
#define		OPTYPE_DELDIFFERENTFILE			(3)

#define		ERRFILENAME						_T("FbopError.CSV")
#define		ERRTYPE_ERR						_T("Error")
#define		ERRTYPE_WARNNING				_T("Warnning")
#define		ERRCONBREAK						_T("__")

/*********************************************************************

	Struct define section

*********************************************************************/
typedef struct
{
	CString			strFolderName;
	CStringArray	ErrorTable;
} ErrorFileInfo_t;

/*********************************************************************

	Func declare section

*********************************************************************/
// Initial error file
int InitialErrorFile( CString& strFolderName );

// Add error information
int AddErrInfo( CString strErrType, CString& strErrContent );

// Write error file
int WriteErrFile();

// Judge whether source folder is reasonable
BOOL SourceFolderIsReasonable( CString& strFolerName );

// Judge whether dest folder is reasonable
BOOL DestFolderIsReasonable( CString& strFolerName );

// Create specified directory
int MakeDirectory( CString& strDirectory );

// Get folder name by user specified
int GetSpecifyFolderName( HWND hDlgHandle, CString& strFolerName );

// Get all sub files into one folder
int GetAllSubFilesIntoOneFolder( CString BaseFolderDir, 
			CString DestFolderDir, CStringArray& BaseFilePathTable );

// Delete counter folder file
int DelFolderCounterFiles( CString BaseFolderDir, CString DestFolderDir, 
			CStringArray& BaseFilePathTable, CStringArray& DestFilePathTable,
			int iDelType );

// Get all sub file name
int GetAllSubFilesPath( CString strDir, CStringArray& FileList );

// Whether two files are identical
int TwoFilesAreIdentical(CString strFile1, CString strFile2);

#endif // __COMMON_H__
// End of file

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -