| Class TMyFF (unit myff) |
TComponent
| Constructors |
constructor create(aowner : tcomponent);tMyFF implementation
| Functions |
function convertdatetime (val:tfiletime):tdatetime;charlowerbuff(@fgrepmask[1],length(fgrepmask));
destructor destroy;
function find(root : string):boolean;
function getattr : integer;
function getfilemask:string;
function getfirsttime:tdatetime;
function getlasttime:tdatetime;
procedure setattr(val : integer);
procedure setfilemask(val : string);
procedure setfirsttime(val:tdatetime);
procedure setgrepmask(val:string);
procedure setlasttime(val:tdatetime);| Properties |
property Attributes : integer
property FindString : string
property RecurseDirs : boolean
property FileMask : string
property FirstTime : tdatetime
property LastTime : tdatetime
property MaxFileSize : longint
property MinFileSize : longint| Events |
event OnAddFile : taddevent
event OnChDir : tfileevent
event OnScanFile : tfileevent| Variables |
fattr : integer;
ffileevent : tfileevent;
ffilemask : tstringlist;
fgrepmask : string;
fonadd : taddevent;
frecurse : boolean;
fscanevent : tfileevent;
fsizemax : longint;
fsizemin : longint;
ftimefirst : tfiletime;
ftimelast : tfiletime;
ftsearch : ttisearch;| Constructors |
constructor create(aowner : tcomponent);Public-Deklarationen
tMyFF implementation
| Functions |
function convertdatetime (val:tfiletime):tdatetime;this is a useful routine to convert a tfiletime-struct to a delphi's tdatetime
charlowerbuff(@fgrepmask[1],length(fgrepmask));
destructor destroy;
function find(root : string):boolean;here we start searching for files, if the function has been canceled, the result will be set to false root is the start directory
function getattr : integer;
function getfilemask:string;filetime nach tdatetime umsetzen
function getfirsttime:tdatetime;filetime nach tdatetime umsetzen
function getlasttime:tdatetime;tdatetime nach filetime umsetzen
procedure setattr(val : integer);
procedure setfilemask(val : string);
procedure setfirsttime(val:tdatetime);tdatetime nach filetime umsetzen
procedure setgrepmask(val:string);
procedure setlasttime(val:tdatetime);| Properties |
property Attributes : integerfileattributes to search for (faanyfile,fasysfile ...
property FindString : stringtext to find in files (set to '' for no text-search
property RecurseDirs : booleanshall we recurse thru all sub-directories?
property FileMask : stringfilemask (*.*;*.exe and so on
property FirstTime : tdatetimeearliest file-time to match
property LastTime : tdatetimelatest filetime to match
property MaxFileSize : longinthighest filesize to match
property MinFileSize : longintleast filesize to match
| Events |
event OnAddFile : taddeventif a file matches the specified values, this event will be called
event OnChDir : tfileeventif we change to another directory (and/or if we search for text in another file
event OnScanFile : tfileevent| Variables |
fattr : integer;
ffileevent : tfileevent;
ffilemask : tstringlist;Private-Deklarationen
fgrepmask : string;
fonadd : taddevent;
frecurse : boolean;
fscanevent : tfileevent;
fsizemax : longint;
fsizemin : longint;
ftimefirst : tfiletime;
ftimelast : tfiletime;
ftsearch : ttisearch;