Solved

Mac File Change Event

Posted on 2004-10-10
2
224 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

726 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