Difference between revisions of "ATFileNotif"

From Lazarus wiki
Jump to navigationJump to search
(new)
 
Line 1: Line 1:
 
=About=
 
=About=
ATFileNotif is simple component which detects file change. It uses timer, timer checks are file props (file exists; file size; file age) changed or not.
+
ATFileNotif is simple component which detects file change. It uses timer, timer checks are file props (file exists; file size; file age) changed or not. It calls OnChanged.
 +
 
 +
Example of function which starts file watch:
 +
 
 +
<syntaxhighlight>
 +
procedure TfmMain.NotifyFile;
 +
begin
 +
  with ATFileNotif1 do
 +
  begin
 +
    Timer.Enabled:= False;
 +
    Timer.Interval:= 1000;
 +
    FileName:= edFileName.Text;
 +
    Timer.Enabled:= True;
 +
  end;
 +
end;
 +
</syntaxhighlight>
  
 
=Download=
 
=Download=
  
 
Github: https://github.com/Alexey-T/ATFileNotif-Lazarus
 
Github: https://github.com/Alexey-T/ATFileNotif-Lazarus

Revision as of 23:12, 13 September 2015

About

ATFileNotif is simple component which detects file change. It uses timer, timer checks are file props (file exists; file size; file age) changed or not. It calls OnChanged.

Example of function which starts file watch:

procedure TfmMain.NotifyFile;
begin
  with ATFileNotif1 do
  begin
    Timer.Enabled:= False;
    Timer.Interval:= 1000;
    FileName:= edFileName.Text;
    Timer.Enabled:= True;
  end;
end;

Download

Github: https://github.com/Alexey-T/ATFileNotif-Lazarus