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
--

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to