FSEvents
The FSEvents API in macOS allows applications to register for notifications of changes to a given directory tree.[1] Whenever the filesystem is changed, the kernel passes notifications via the special device file /dev/fsevents to a userspace process called fseventsd. This process combines multiple changes to a single directory tree that occur within a short period of time, then notifies applications that have registered for changes to the affected directory.[2]
Until Mac OS X 10.7, FSEvents did not "watch" the filesystem, such as Linux's inotify: the API provided no notifications for changes to individual files. An application was able to register to receive changes to a given directory, and had to determine for itself which file or files were changed.[3]
Mac OS X 10.7 (Lion) added the ability to register for file modification notifications.[4]
See also
References
- ^ "Leopard Technology Series for Developers: OS Foundations". 2007-10-26. Retrieved 2008-08-21.
- ^ "File System Events Programming Guide: Using the File System Events API". 2012-12-13. Retrieved 2017-10-13.
- ^ "FSEvents.h -- FSEventStreamCallback". 2011-05-05. Archived from the original on 2011-05-04. Retrieved 2011-08-16.
- ^ "FSEvents reference -- kFSEventStreamCreateFlagFileEvents". Retrieved 2017-10-13.
External links
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.