| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 | #pragma once//#include <boost/scope_exit.hpp>#include <boost/noncopyable.hpp>#include <wtypes.h>#include <afxstr.h>#include "otsdataconst.h"namespace OTSTools {	using namespace OTSDATA;	/*typedef enum class __declspec(dllexport) OTS_SOFT_PACKAGE_ID	{		INVALID = -1,		MIN = 0,		OTSIncA = 0,		OTSPartA = 1,		MAX = 1*/	//} OTS_SOFT_PACKAGE_ID;	class __declspec(dllexport) COTSFileSys : private boost::noncopyable	{	public:		COTSFileSys();        		~COTSFileSys();		// check if the file exists or not		static BOOL Exists(LPCTSTR a_sPath);		// check if the given string is valid file name or not		static BOOL IsValidFileName(LPCTSTR a_sFileName);		// copy a file		static BOOL CopyAFile(LPCTSTR a_strSourceFile, LPCTSTR a_strTargetFile, const BOOL a_bOverwrite = FALSE);		// move a file		static BOOL MoveAFile(LPCTSTR a_strSourceFile, LPCTSTR a_strTargetFile, const BOOL a_bOverwrite = TRUE);		// delete a file.		static BOOL DeleteAFile(LPCTSTR a_strFileName);		// delete all files in the folder		static BOOL DeleteAllFiles(LPCTSTR a_strFolder, LPCTSTR a_sFilter = nullptr);		// creates a folder.		static BOOL CreateFolder(LPCTSTR a_strFolder);		// deletes a folder and contents recursively.		static BOOL DeleteFolder(LPCTSTR a_strFolder);		// check if this is an existing folder		static BOOL IsFolder(LPCTSTR a_strFolder);		// check if the file or folder is read only		static BOOL IsReadOnly(LPCTSTR a_strPathName);		// sets the read only flag for a file or a folder 		static BOOL SetReadOnly(LPCTSTR a_strPathName, BOOL a_bReadOnly = TRUE);		// get system common data folder pathname		static CString GetOSCommonDataPathName();	 		// get company system data pathname		static CString GetSysDataPathName();	 		// get company log path		static CString GetLogPathName();	 		// get software pack system data path		static CString GetOTSPackSysDataPathName(OTS_SOFT_PACKAGE_ID a_nPackId);	 		// get software pack program data path		static CString GetOTSPackProgDataPathName(OTS_SOFT_PACKAGE_ID a_nPackId);		// get software pack measure preference file path name		static CString GetOTSPackMeasurePrefFilePathName(OTS_SOFT_PACKAGE_ID a_nPackId);		// get software pack measure preference file path name		static CString GetOTSPackReportPrefFilePathName(OTS_SOFT_PACKAGE_ID a_nPackId);		// get system STD lib file path name		static CString GetOTSPackSysSTDLibFilePathName(OTS_SOFT_PACKAGE_ID a_nPackId);	};}
 |