TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Automatically running a command whenever a file is saved

7 点作者 lenni超过 14 年前

3 条评论

mthomas超过 14 年前
I notice that you're using a polling thread keep track of modification times. I know that linux has inotify: <a href="http://github.com/seb-m/pyinotify" rel="nofollow">http://github.com/seb-m/pyinotify</a> and OsX has something similar with FSEvents: <a href="http://pypi.python.org/pypi/MacFSEvents" rel="nofollow">http://pypi.python.org/pypi/MacFSEvents</a>
shabble超过 14 年前
I quite like <a href="http://search.cpan.org/~drolsky/File-ChangeNotify-0.17/lib/File/ChangeNotify.pm" rel="nofollow">http://search.cpan.org/~drolsky/File-ChangeNotify-0.17/lib/F...</a> for perl. It's cross-platform (backends for linux, OSX/BSD and Win32 afaik), and is very straightforward to use.
评论 #1779430 未加载
zacharydanger超过 14 年前
Sounds like incron. Which is just a cron-like interface for inotify.