CDEvent Class Reference
| Inherits from | NSObject |
| Conforms to | NSCoding NSCopying |
| Declared in | CDEvent.h |
Overview
An Objective-C wrapper for a FSEvents event data.
@note Inpired by SCEvent class of the SCEvents project by Stuart Connolly.
@note The class is immutable.
Tasks
-
identifierThe event identifier.
property -
dateAn approximate date and time the event occured.
property -
URLThe URL of the item which changed.
property -
flagsThe flags of the event.
property -
isGenericChangeWheter there was some change in the directory at the specific path supplied in this event.
property -
mustRescanSubDirectoriesWheter you must rescan the whole URL including its children.
property -
isUserDroppedProvides some information as to what might have caused the need to rescan the URL including its children.
property -
isKernelDroppedProvides some information as to what might have caused the need to rescan the URL including its children.
property -
isEventIdentifiersWrappedWheter the 64-bit event identifier counter has wrapped around.
property -
isHistoryDoneDenotes a sentinel event sent to mark the end of the “historical” events sent.
property -
isRootChangedDenotes a special event sent when there is a change to one of the URLs you asked to watch.
property -
didVolumeMountDenotes a special event sent when a volume is mounted underneath one of the URLs being watched.
property -
didVolumeUnmountDenotes a special event sent when a volume is unmounted underneath one of the URLs being watched.
property -
+ eventWithIdentifier:date:URL:flags:Returns an
CDEventcreated with the given identifier, date, URL and flags. -
– initWithIdentifier:date:URL:flags:Returns an
CDEventobject initialized with the given identifier, date, URL and flags.
Properties
URL
The URL of the item which changed.
@property (readonly) NSURL *URLReturn Value
The URL of the item which changed.
Availability
1.0.0
Discussion
The URL of the item which changed.
Declared In
CDEvent.hdate
An approximate date and time the event occured.
@property (readonly) NSDate *dateReturn Value
The approximate date and time the event occured.
Availability
1.0.0
Discussion
An approximate date and time the event occured.
Declared In
CDEvent.hdidVolumeMount
Denotes a special event sent when a volume is mounted underneath one of the URLs being watched.
@property (readonly) BOOL didVolumeMountReturn Value
YES if a volumen is mounted underneath one of the URLs being watched, otherwise NO
Availability
1.1.0
Discussion
Denotes a special event sent when a volume is mounted underneath one of the URLs being watched.
Denotes a special event sent when a volume is mounted underneath one of the
URLs being watched. The URL in the event is the URL to the newly-mounted
volume. You will receive one of these notifications for every volume mount
event inside the kernel (independent of DiskArbitration). Beware that a
newly-mounted volume could contain an arbitrarily large directory hierarchy.
Avoid pitfalls like triggering a recursive scan of a non-local filesystem,
which you can detect by checking for the absence of the
MNT_LOCAL flag in the f_flags returned by statfs().
Also be aware of the MNT_DONTBROWSE flag that is set for volumes
which should not be displayed by user interface elements.
See Also
Declared In
CDEvent.hdidVolumeUnmount
Denotes a special event sent when a volume is unmounted underneath one of the URLs being watched.
@property (readonly) BOOL didVolumeUnmountReturn Value
YES if a volume is unmounted underneath one of the URLs being watched, otherwise NO
Availability
1.1.0
Discussion
Denotes a special event sent when a volume is unmounted underneath one of the URLs being watched.
Denotes a special event sent when a volume is unmounted underneath one of the URLs being watched. The URL in the event is the URL to the directory from which the volume was unmounted. You will receive one of these notifications for every volume unmount event inside the kernel. This is not a substitute for the notifications provided by the DiskArbitration framework; you only get notified after the unmount has occurred. Beware that unmounting a volume could uncover an arbitrarily large directory hierarchy, although Mac OS X never does that.
See Also
Declared In
CDEvent.hflags
The flags of the event.
@property (readonly) CDEventFlags flagsReturn Value
The flags of the event.
Availability
1.0.0
Declared In
CDEvent.hidentifier
The event identifier.
@property (readonly) CDEventIdentifier identifierReturn Value
The event identifier.
Availability
1.0.0
Declared In
CDEvent.hisEventIdentifiersWrapped
Wheter the 64-bit event identifier counter has wrapped around.
@property (readonly) BOOL isEventIdentifiersWrappedReturn Value
YES if the 64-bit event identifier counter has wrapped around, otherwise NO
Availability
1.1.0
Discussion
Wheter the 64-bit event identifier counter has wrapped around.
Wheter the 64-bit event identifier counter has wrapped around. As a result, previously-issued event identifiers are no longer valid arguments for the sinceEventIdentifier parameter of the CDEvents init methods.
See Also
Declared In
CDEvent.hisGenericChange
Wheter there was some change in the directory at the specific path supplied in this event.
@property (readonly) BOOL isGenericChangeReturn Value
YES if there was some change in the directory, otherwise NO
Availability
1.1.0
Discussion
Wheter there was some change in the directory at the specific path supplied in this event.
See Also
Declared In
CDEvent.hisHistoryDone
Denotes a sentinel event sent to mark the end of the “historical” events sent.
@property (readonly) BOOL isHistoryDoneReturn Value
YES if if the event is sent to mark the end of the “historical” events sent, otherwise NO
Availability
1.1.0
Discussion
Denotes a sentinel event sent to mark the end of the “historical” events sent.
Denotes a sentinel event sent to mark the end of the “historical” events sent as a result of specifying a sinceEventIdentifier argument other than kCDEventsSinceEventNow with the CDEvents init methods.
See Also
Declared In
CDEvent.hisKernelDropped
Provides some information as to what might have caused the need to rescan the URL including its children.
@property (readonly) BOOL isKernelDroppedReturn Value
YES if mustRescanSubDirectories returns YES and the cause were in kernelspace, otherwise NO
Availability
1.1.0
Discussion
Provides some information as to what might have caused the need to rescan the URL including its children.
See Also
Declared In
CDEvent.hisRootChanged
Denotes a special event sent when there is a change to one of the URLs you asked to watch.
@property (readonly) BOOL isRootChangedReturn Value
YES if there is a change to one of the URLs you asked to watch, otherwise NO
Availability
1.1.0
Discussion
Denotes a special event sent when there is a change to one of the URLs you asked to watch.
Denotes a special event sent when there is a change to one of the URLs you
asked to watch. When this method returns YES, the event
identifier is zero and the URL corresponds to one of the URLs
you asked to watch (specifically, the one that changed). The URL may no
longer exist because it or one of its parents was deleted or renamed. Events
with this flag set will only be sent if you passed the flag
kFSEventStreamCreateFlagWatchRoot to the CDEvents.
See Also
Declared In
CDEvent.hisUserDropped
Provides some information as to what might have caused the need to rescan the URL including its children.
@property (readonly) BOOL isUserDroppedReturn Value
YES if mustRescanSubDirectories returns YES and the cause were in userland, otherwise NO
Availability
1.1.0
Discussion
Provides some information as to what might have caused the need to rescan the URL including its children.
See Also
Declared In
CDEvent.hmustRescanSubDirectories
Wheter you must rescan the whole URL including its children.
@property (readonly) BOOL mustRescanSubDirectoriesReturn Value
YES if you must rescan the whole directory including its children, otherwise NO
Availability
1.1.0
Discussion
Wheter you must rescan the whole URL including its children.
Wheter your application must rescan not just the URL given in the event, but
all its children, recursively. This can happen if there was a problem whereby
events were coalesced hierarchically. For example, an event in
/Users/jsmith/Music and an event in
/Users/jsmith/Pictures might be coalesced into an event with
this flag set and URL=/Users/jsmith. If this flag is set
you may be able to get an idea of whether the bottleneck happened in the
kernel (less likely) or in your client (more likely) by checking if
flagUserDropped or flagKernelDropped returns YES.
See Also
Declared In
CDEvent.hClass Methods
eventWithIdentifier:date:URL:flags:
Returns an CDEvent created with the given identifier, date, URL and flags.
+ (CDEvent *)eventWithIdentifier:(NSUInteger)identifier date:(NSDate *)date URL:(NSURL *)URL flags:(CDEventFlags)flagsParameters
- identifier
The identifier of the the event.
- date
The date when the event occured.
- URL
The URL of the item the event concerns.
- flags
The flags of the event.
Return Value
An CDEvent created with the given identifier, date, URL and flags.
Availability
1.0.0
Discussion
Returns an CDEvent created with the given identifier, date, URL and flags.
See Also
Declared In
CDEvent.hInstance Methods
initWithIdentifier:date:URL:flags:
Returns an CDEvent object initialized with the given identifier, date, URL and flags.
- (id)initWithIdentifier:(NSUInteger)identifier date:(NSDate *)date URL:(NSURL *)URL flags:(CDEventFlags)flagsParameters
- identifier
The identifier of the the event.
- date
The date when the event occured.
- URL
The URL of the item the event concerns.
- flags
The flags of the event.
Return Value
An CDEvent object initialized with the given identifier, date, URL and flags.
Availability
1.0.0
Discussion
Returns an CDEvent object initialized with the given identifier, date, URL and flags.
Declared In
CDEvent.h