ATFileNotif: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: ATFileNotif
| Old | New | Line | |
|---|---|---|---|
| 1 | + | # About | |
| 2 | + | ||
| 3 | + | 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. | |
| 4 | + | ||
| 5 | + | <figure> | |
| 6 | + | <img src="atfilenotif.png" title="atfilenotif.png" /> | |
| 7 | + | <figcaption>atfilenotif.png</figcaption> | |
| 8 | + | </figure> | |
| 9 | + | ||
| 10 | + | # Example | |
| 11 | + | ||
| 12 | + | Example of function which starts file watch: | |
| 13 | + | ||
| 14 | + | ``` pascal | |
| 15 | + | procedure TfmMain.NotifyFile; | |
| 16 | + | begin | |
| 17 | + | with ATFileNotif1 do | |
| 18 | + | begin | |
| 19 | + | Timer.Enabled:= False; | |
| 20 | + | Timer.Interval:= 1000; | |
| 21 | + | FileName:= edFileName.Text; | |
| 22 | + | Timer.Enabled:= True; | |
| 23 | + | end; | |
| 24 | + | end; | |
| 25 | + | ``` | |
| 26 | + | ||
| 27 | + | # Download | |
| 28 | + | ||
| 29 | + | Github: <https://github.com/Alexey-T/ATFileNotif-Lazarus> | |
| 30 | + | ||
| 31 | + | # License | |
| 32 | + | ||
| 33 | + | MPL 2.0 or LGPL. | |
| 34 | + | ||
| 35 | + | --- | |
| 36 | + | *From the Free Pascal wiki, page "ATFileNotif", as it stood on 2020-02-09 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* | |
| 37 | + | Category: Components |
