Is there something like Perl's Win32::FileNotify for Linux or OS X?

柔情痞子 提交于 2019-12-20 03:20:00

问题


I've been using Win32::FileNotify on Windows, and I was curious to know if there were something similar for Linux and OS X. I haven't been able to find such a module using Google. Does anyone here know of such a thing?


回答1:


File::ChangeNotify sounds like a cross-platform way to do this.




回答2:


For systems where famd can run (Irix, Linux, BSDs, most Unices) there is SGI::FAM and Sys::Gamin, both of which do not build straight out of CPAN or tarball, but do work well once you get them working.




回答3:


While I don't know of a specific cross platform solution there is inotify on linux (well on modern kernels from 2.6.13) and from the Inotify module from CPAN. As for OS X, there is apparently the kqueue syscall but I have no experience of using it.



来源:https://stackoverflow.com/questions/1776745/is-there-something-like-perls-win32filenotify-for-linux-or-os-x

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!