ATFileNotif: what changed
Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.
| Old | New | Line | |
|---|---|---|---|
| 1 | + | ## Contents | |
| 2 | + | ||
| 3 | + | * 1 About | |
| 4 | + | * 2 Example | |
| 5 | + | * 3 Download | |
| 6 | + | * 4 License | |
| 7 | + | ||
| 1 | 8 | # About | |
| 2 | 9 | ||
| 3 | - | ||
| 10 | + | 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 | 11 | ||
| 5 | - | ||
| 6 | - | ||
| 7 | - | ||
| 8 | - | ||
| 12 | + | [](</File:atfilenotif.png>) | |
| 9 | 13 | ||
| 10 | 14 | # Example | |
| 11 | 15 | ||
| 12 | - | ||
| 13 | - | ||
| 14 | - | ||
| 16 | + | Example of function which starts file watch: | |
| 17 | + | ``` | |
| 15 | 18 | procedure TfmMain.NotifyFile; | |
| 16 | - | ||
| 17 | - | ||
| 18 | - | ||
| 19 | - | ||
| 20 | - | ||
| 21 | - | ||
| 22 | - | ||
| 23 | - | ||
| 24 | - | ||
| 19 | + | begin | |
| 20 | + | with ATFileNotif1 do | |
| 21 | + | begin | |
| 22 | + | Timer.Enabled:= False; | |
| 23 | + | Timer.Interval:= 1000; | |
| 24 | + | FileName:= edFileName.Text; | |
| 25 | + | Timer.Enabled:= True; | |
| 26 | + | end; | |
| 27 | + | end; | |
| 25 | 28 | ``` | |
| 26 | 29 | ||
| 27 | 30 | # Download | |
| 28 | 31 | ||
| 29 | 32 | Github: <https://github.com/Alexey-T/ATFileNotif-Lazarus> | |
| 30 | 33 | ||
| 31 | 34 | # License | |
| 32 | 35 | ||
| 33 | 36 | MPL 2.0 or LGPL. | |
| 34 | 37 | ||
| 35 | 38 | --- | |
| 36 | - | ||
| 37 | - | ||
| 39 | + | *From the Free Pascal wiki, page "ATFileNotif", as the Internet Archive kept it on 2024-03-08. 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).* |
