How to be notified of file/directory change in C/C++, ideally using POSIX

前端 未结 7 772
无人及你
无人及你 2020-12-08 04:40

The subject says it all - normally easy and cross platform way is to poll, intelligently. But every OS has some means to notify without polling. Is it possible in a reasonab

7条回答
  •  醉梦人生
    2020-12-08 05:09

    Linux users can use inotify

    inotify is a Linux kernel subsystem that provides file system event notification.

    Some goodies for Windows fellows:

    • File Change Notification on MSDN
    • "When Folders Change" article
    • File System Notification on Change

提交回复
热议问题