1

在 Mac OS 中,我的应用程序只读取文件 - 当文件被其他应用程序修改时。为此,我使用 fstat 检查文件修改时间戳。下面是代码片段

  fstat(mHFile,&mCurrentTimeStamp);

  mCurrentTimeStamp.st_mtimespec.tv_sec will gives information up to seconds field DDMMYYY HR:MM:SS

  But mCurrentTimeStamp.st_mtimespec.tv_nsec is always 0. Because of this, if the application has modified below 1 second - I wont be able to read those kind of messages.

  Reading of messages which are modified with in 1 second duration is very important for my application.

  What i have to do for this?
4

1 回答 1

0

查看文件系统事件 API

于 2013-05-31T06:42:16.103 回答