Detect when a file has been recreated using a stat watcher
Graham Leggett
minfrin at sharp.fm
Wed Dec 10 20:12:35 CET 2008
Hi all,
Given a stat watcher, how do I detect whether a file has been deleted
and recreated?
I can detect when a file has been deleted by looking at stat.st_nlink,
but if the file is recreated st_nlink goes back to 1. I would have
thought that st_ino would change if the file is recreated, but it
doesn't seem to do so.
Can anyone confirm what the correct way is to handle this?
Regards,
Graham
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3287 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20081210/5982ed3f/attachment.bin>
More information about the libev
mailing list