(CarbonCore.framework)FSEventStreamFlushSync():断言失败'(SInt64)last_id> 0LL'

时间:2015-04-14 20:16:42

标签: objective-c macos cocoa macos-carbon fsevents

我使用库CDEvents来监控文件系统。

调用方法flash Synchronously

- (void)flushSynchronously
{
    FSEventStreamFlushSync(_eventStream);
}

收到消息

(CarbonCore.framework) FSEventStreamFlushSync(): failed assertion '(SInt64)last_id > 0LL'

以下是来自FSEvents.h的方法签名FSEventStreamFlushSync()

/*
 *  FSEventStreamFlushSync()
 *  
 *  Discussion:
 *    Asks the FS Events service to flush out any events that have
 *    occurred but have not yet been delivered, due to the latency
 *    parameter that was supplied when the stream was created.  This
 *    flushing occurs synchronously -- by the time this call returns,
 *    your callback will have been invoked for every event that had
 *    already occurred at the time you made this call.
 *    FSEventStreamFlushSync() can only be called after the stream has
 *    been started, via FSEventStreamStart().
 *  
 *  Parameters:
 *    
 *    streamRef:
 *      A valid stream.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.5 and later in CoreServices.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 */
extern void 
FSEventStreamFlushSync(FSEventStreamRef streamRef)            __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA);

0 个答案:

没有答案