Documentation ¶
Rendered for darwin/amd64
Overview ¶
Package fsevents provides file system notifications on OS X.
Index ¶
Constants ¶
View Source
const EventIDSinceNow = uint64(C.kFSEventStreamEventIdSinceNow + (1 << 64))
EventIdSinceNow is a sentinel to begin watching events "since now".
Variables ¶
This section is empty.
Functions ¶
func DeviceForPath ¶
DeviceForPath returns the device ID for the specified volume.
func EventIDForDeviceBeforeTime ¶
EventIDForDeviceBeforeTime returns an event ID before a given time.
func LatestEventID ¶
func LatestEventID() uint64
LatestEventID returns the most recently generated event ID, system-wide.
Types ¶
type CreateFlags ¶
type CreateFlags uint32
CreateFlags for creating a New stream.
const ( // NoDefer sends events on the leading edge (for interactive applications). // By default events are delivered after latency seconds (for background tasks). NoDefer CreateFlags // WatchRoot for a change to occur to a directory along the path being watched. WatchRoot // IgnoreSelf doesn't send events triggered by the current process (OS X 10.6+). IgnoreSelf // FileEvents sends events about individual files, generating significantly // more events (OS X 10.7+) than directory level notifications. FileEvents )
kFSEventStreamCreateFlag...
type Event ¶
type Event struct { Path string Flags EventFlags ID uint64 }
Event represents a single file system notification.
type EventFlags ¶
type EventFlags uint32
EventFlags passed to the FSEventStreamCallback function.
const ( // MustScanSubDirs indicates that events were coalesced hierarchically. MustScanSubDirs EventFlags = 1 << iota // UserDropped or KernelDropped is set alongside MustScanSubDirs // to help diagnose the problem. UserDropped KernelDropped // EventIDsWrapped indicates the 64-bit event ID counter wrapped around. EventIDsWrapped // HistoryDone is a sentinel event when retrieving events sinceWhen. HistoryDone // RootChanged indicates a change to a directory along the path being watched. RootChanged // Mount for a volume mounted underneath the path being monitored. Mount // Unmount event occurs after a volume is unmounted. Unmount ItemCreated ItemRemoved ItemInodeMetaMod ItemRenamed ItemModified ItemFinderInfoMod ItemChangeOwner ItemXattrMod ItemIsFile ItemIsDir ItemIsSymlink )
kFSEventStreamEventFlag...
type EventStream ¶
type EventStream struct { Events chan []Event Paths []string Flags CreateFlags EventID uint64 Resume bool Latency time.Duration Device int32 // contains filtered or unexported fields }
EventStream is the primary interface to FSEvents.
func (*EventStream) Flush ¶
func (es *EventStream) Flush(sync bool)
Flush events that have occurred but haven't been delivered.
Click to show internal directories.
Click to hide internal directories.