Solved

Mac File Change Event

Posted on 2004-10-10
2
219 Views
Last Modified: 2013-12-26
Does OS X have an easy OS hook to detect file changes in the filesystem?

What I need is a way to detect when a user writes to a filesystem in real time - as you might have in a virus scanner that needs to scan any changes that get written to the filesystem.

0
Comment
Question by:rcovington
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
brettmjohnson earned 500 total points
ID: 12273153
The File Notification APIs deal with this, specifically FNSubscribe() and FNSubscribeByPath() in File.h:
http://developer.apple.com/documentation/Carbon/Reference/File_Manager/file_manager/function_group_48.html

0
 

Author Comment

by:rcovington
ID: 12375055
Thanks!  That gave me a starting point to solve my issue. For anyone else going down this road, in addition to FNSubscribe, OS X has the kqueue interface which also provides some of this information.

Thanks for the quick response.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
deburging in oracle form 12 119
ASCII Non-Printable characters/codes and their HTML equivalents 6 159
NotAlone Challenge 20 92
Work with App store 7 121
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question