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

📄 filesearch.hpp

📁 可以使用硬件指纹作为密钥加密文件
💻 HPP
字号:
// Borland C++ Builder
// Copyright (c) 1995, 2002 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'FileSearch.pas' rev: 6.00

#ifndef FileSearchHPP
#define FileSearchHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <Masks.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Filesearch
{
//-- type declarations -------------------------------------------------------
#pragma pack(push, 1)
struct TSearchOptions
{
	bool IncludeSubfolder;
	bool LookForReadOnlyFile;
	bool LookForHiddenFile;
	bool LookForSystemFile;
	bool LookForDirectory;
	bool LookForArchiveFile;
	bool LookForAnyFile;
} ;
#pragma pack(pop)

#pragma option push -b-
enum TDateFilterAccessKind { dfakCreatedFiles, dfakModifiedFiles, dfakOpenedFiles, dfakAnyFiles };
#pragma option pop

#pragma option push -b-
enum TDateFilterKind { dfkBetween, dfkBefore, dfkAfter, dfkSame };
#pragma option pop

struct TDateFilter
{
	bool FilterOnDate;
	TDateFilterAccessKind FilterAccessKind;
	TDateFilterKind DateFilterKind;
	System::TDateTime FirstDate;
	System::TDateTime SecondDate;
} ;

#pragma option push -b-
enum TSizeFilterKind { sfkSmallerOrEqualTo, sfkBiggerOrEqualTo };
#pragma option pop

#pragma pack(push, 4)
struct TSizeFilter
{
	bool FilterOnSize;
	TSizeFilterKind SizeFilterKind;
	int Size;
} ;
#pragma pack(pop)

#pragma pack(push, 2)
struct TFileTime
{
	_SYSTEMTIME CreationTime;
	_SYSTEMTIME AccessTime;
	_SYSTEMTIME WriteTime;
} ;
#pragma pack(pop)

#pragma pack(push, 4)
struct TFileInformations
{
	AnsiString Name;
	AnsiString Path;
	int Attributes;
	int Size;
	TFileTime Time;
} ;
#pragma pack(pop)

#pragma pack(push, 4)
struct TStatistics
{
	unsigned NbFilesFound;
	unsigned FoundInNbPath;
	unsigned NbPathFound;
	unsigned TimeNeeded;
} ;
#pragma pack(pop)

typedef void __fastcall (__closure *TOnFileFound)(const TFileInformations &FileFound);

typedef void __fastcall (__closure *TOnChangeFolder)(AnsiString NewPath);

typedef void __fastcall (__closure *TOnStatistics)(const TStatistics &Stats);

typedef bool __fastcall (__closure *TOnAcceptFile)(const TFileInformations &FileFound);

class DELPHICLASS TFileSearch;
class PASCALIMPLEMENTATION TFileSearch : public System::TObject 
{
	typedef System::TObject inherited;
	
protected:
	TFileInformations __fastcall GetFileInformations(AnsiString Path, const Sysutils::TSearchRec &SearchInfos);
	int __fastcall GetAttributeFilter(void);
	bool __fastcall IsAttributesOk(int AttrToCheck);
	bool __fastcall IsDateOk(const TFileInformations &FileInfos);
	bool __fastcall IsSizeOk(const TFileInformations &FileInfos, const TSizeFilter &SizeFilter);
	bool __fastcall IsFileMatching(AnsiString FileName);
	bool __fastcall IsAllFileMarkerPresents(void);
	bool __fastcall ExcludeFile(const TFileInformations &FileInfos, Classes::TStringList* Exclude);
	
public:
	#pragma pack(push, 1)
	TSearchOptions SearchOptions;
	#pragma pack(pop)
	
	TDateFilter DateOptions;
	TSizeFilter SizeOptions;
	Classes::TStringList* FileNames;
	AnsiString RootPath;
	Classes::TStringList* ExcludeFilters;
	TOnFileFound OnFileFound;
	TOnChangeFolder OnChangeFolder;
	TOnStatistics OnStatistics;
	TOnAcceptFile OnAcceptFile;
	__fastcall TFileSearch(void);
	__fastcall virtual ~TFileSearch(void);
	bool __fastcall Search(void);
};


//-- var, const, procedure ---------------------------------------------------

}	/* namespace Filesearch */
using namespace Filesearch;
#pragma option pop	// -w-
#pragma option pop	// -Vx

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// FileSearch

⌨️ 快捷键说明

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