2012-03-17 12:27:20 +00:00
|
|
|
/*
|
|
|
|
Copyright (C) 2010 Elestel
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
2010-11-15 14:38:12 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <windows.h>
|
2012-03-17 12:27:20 +00:00
|
|
|
#include "../../Library/RawString.h"
|
2011-05-16 09:24:13 +00:00
|
|
|
#include "../../Library/pcre-8.10/config.h"
|
2011-02-03 18:09:24 +00:00
|
|
|
#include "../../Library/pcre-8.10/pcre.h"
|
2010-11-15 14:38:12 +00:00
|
|
|
|
2012-03-17 12:27:20 +00:00
|
|
|
class CFolderInfo
|
2010-11-15 14:38:12 +00:00
|
|
|
{
|
2012-03-17 12:27:20 +00:00
|
|
|
public:
|
|
|
|
CFolderInfo(LPCWSTR path);
|
|
|
|
~CFolderInfo();
|
2010-11-15 14:38:12 +00:00
|
|
|
|
2012-03-17 12:27:20 +00:00
|
|
|
void AddInstance();
|
|
|
|
void RemoveInstance();
|
|
|
|
|
|
|
|
DWORD GetLastUpdateTime() { return m_LastUpdateTime; }
|
|
|
|
|
|
|
|
void SetRegExpFilter(LPCWSTR filter);
|
|
|
|
|
|
|
|
void IncludeSubFolders(bool flag) { m_IncludeSubFolders = flag; }
|
|
|
|
void IncludeHiddenFiles(bool flag) { m_IncludeHiddenFiles = flag; }
|
|
|
|
void IncludeSystemFiles(bool flag) { m_IncludeSystemFiles = flag; }
|
|
|
|
|
|
|
|
LPCWSTR GetPath() { return m_Path.c_str(); }
|
|
|
|
|
|
|
|
UINT64 GetSize() { return m_Size; }
|
|
|
|
int GetFileCount() { return m_FileCount; }
|
|
|
|
int GetFolderCount() { return m_FolderCount; }
|
|
|
|
|
|
|
|
void Update();
|
2010-11-15 14:38:12 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void Clear();
|
2012-02-04 08:25:11 +00:00
|
|
|
void FreePcre();
|
2010-11-15 14:38:12 +00:00
|
|
|
void CalculateSize();
|
|
|
|
|
2012-03-17 12:27:20 +00:00
|
|
|
UINT m_InstanceCount;
|
2010-11-15 14:38:12 +00:00
|
|
|
|
2012-03-17 12:27:20 +00:00
|
|
|
CRawString m_Path;
|
|
|
|
bool m_IncludeSubFolders;
|
|
|
|
bool m_IncludeHiddenFiles;
|
|
|
|
bool m_IncludeSystemFiles;
|
|
|
|
UINT64 m_Size;
|
|
|
|
UINT m_FileCount;
|
|
|
|
UINT m_FolderCount;
|
|
|
|
pcre* m_RegExpFilter;
|
|
|
|
DWORD m_LastUpdateTime;
|
|
|
|
};
|