2010-11-15 14:38:12 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
#include <windows.h>
|
2011-02-03 18:09:24 +00:00
|
|
|
#include "../../Library/pcre-8.10/pcre.h"
|
2010-11-15 14:38:12 +00:00
|
|
|
|
|
|
|
namespace PluginFolderInfo {
|
|
|
|
|
|
|
|
struct FileInfo
|
|
|
|
{
|
|
|
|
std::wstring Name;
|
|
|
|
bool IsFolder;
|
|
|
|
UINT64 Size;
|
|
|
|
|
|
|
|
FileInfo()
|
|
|
|
{
|
|
|
|
IsFolder = false;
|
|
|
|
Size = 0;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
class FolderInfo
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
bool mySubFolderFlag;
|
|
|
|
bool myHiddenFileFlag;
|
|
|
|
bool mySystemFileFlag;
|
|
|
|
std::wstring myPath;
|
|
|
|
UINT64 mySize;
|
|
|
|
unsigned int myFileCount;
|
|
|
|
unsigned int myFolderCount;
|
2010-11-15 15:23:32 +00:00
|
|
|
pcre* myRegExpFilter;
|
|
|
|
pcre_extra* myRegExpFilterExtra;
|
2010-11-15 14:38:12 +00:00
|
|
|
DWORD myLastUpdateTime;
|
|
|
|
|
|
|
|
private:
|
|
|
|
void Clear();
|
|
|
|
void CalculateSize();
|
2010-12-06 07:43:30 +00:00
|
|
|
void SetPath(const wchar_t* aPath, const wchar_t* aIniPath);
|
2010-11-15 14:38:12 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
DWORD GetLastUpdateTime()
|
|
|
|
{
|
|
|
|
return myLastUpdateTime;
|
|
|
|
}
|
|
|
|
|
2010-11-15 15:23:32 +00:00
|
|
|
void SetRegExpFilter(const wchar_t* aFilter);
|
2010-11-15 14:38:12 +00:00
|
|
|
|
|
|
|
void IncludeSubFolders(bool aFlag)
|
|
|
|
{
|
|
|
|
mySubFolderFlag = aFlag;
|
|
|
|
}
|
|
|
|
|
|
|
|
void IncludeHiddenFiles(bool aFlag)
|
|
|
|
{
|
|
|
|
myHiddenFileFlag = aFlag;
|
|
|
|
}
|
|
|
|
|
|
|
|
void IncludeSystemFiles(bool aFlag)
|
|
|
|
{
|
|
|
|
mySystemFileFlag = aFlag;
|
|
|
|
}
|
|
|
|
|
|
|
|
UINT64 GetSize()
|
|
|
|
{
|
|
|
|
return mySize;
|
|
|
|
}
|
|
|
|
|
|
|
|
int GetFileCount()
|
|
|
|
{
|
|
|
|
return myFileCount;
|
|
|
|
}
|
|
|
|
|
|
|
|
int GetFolderCount()
|
|
|
|
{
|
|
|
|
return myFolderCount;
|
|
|
|
}
|
|
|
|
|
2010-12-06 07:43:30 +00:00
|
|
|
FolderInfo(const wchar_t* aPath, const wchar_t* aIniPath);
|
2010-11-15 14:38:12 +00:00
|
|
|
void Update();
|
|
|
|
}; // class FolderInfo
|
|
|
|
|
|
|
|
} // namespace PluginFolderInfo
|