// FileUtils.h: interface for the CFileUtils class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(_FILEUTILS_H_)
#define _FILEUTILS_H_

#include <string>
#include <vector>
#include <set>
#include "cmString.h"

using namespace std;

class CFileUtils  
{
public:
	CFileUtils();
	virtual ~CFileUtils();

	static bool ReadFile(const cmString& fileName, string& fileContent);
	static bool WriteFile(const cmString& fileName, const string& fileContent);

	static bool ReadBinaryFile(const cmString& fileName, vector<BYTE>& fileContent);
	static bool WriteBinaryFile(const cmString& fileName, const vector<BYTE>& fileContent);

	static DWORD GetLastError(cmString* errDescription = NULL);

	static set<cmString> GetFileList(const cmString& pathName, const cmString& filter = _T("*.*"));

protected:

	static DWORD lastError_;

};

#endif // !defined(_FILEUTILS_H_)
