GithubHelp home page GithubHelp logo

mz2 / scevents Goto Github PK

View Code? Open in Web Editor NEW
32.0 5.0 8.0 20 KB

A GCD and ARC Enabled Fork of Stuart Connolly's SCEvents Objective-C wrapper for Mac OS X's FSEvents C API.

C 11.23% Objective-C 88.77%

scevents's Introduction

SCEvents ========

A GCD and ARC Enabled Fork of Stuart Connolly's SCEvents Objective-C wrapper for Mac OS X's FSEvents C API. Updated with bug fixes, code cleanup, event flags that play nicely with Swift, and inclusion of all FSEvent type flags introduced in recent years.

Original code available for download from here: http://stuconnolly.com/downloads/scevents/

License ========

Copyright (c) 2011 Stuart Connolly. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

scevents's People

Contributors

mz2 avatar jnutting avatar

Stargazers

Jevin Sweval avatar Fisher Lee avatar VanJay avatar Lisa avatar Kyle Howells avatar  avatar Kevin Bradley avatar Christian Tietze avatar Melody avatar  avatar André J avatar Wolfgang Baird avatar Knorr avatar coderyi avatar  avatar Yang.Y avatar Yaogang Lian avatar Void Main avatar  avatar Aleksandar Stevic avatar Erich Ocean avatar  avatar Mac Developer avatar Blake Lucchesi avatar David Tucker avatar Ashok Gelal avatar Bai Long avatar Liu Yi avatar uetchy avatar Bob Edmonston avatar  avatar Zach Waugh avatar

Watchers

 avatar Jevin Sweval avatar James Cloos avatar Mac Developer avatar  avatar

scevents's Issues

Get all File and Folder notification using SCEvents (FSEvents wrapper )?

I had implemented file watcher part using SCEvents : https://github.com/mz2/SCEvents It is notifying all changes. But I want only file created, deleted, renamed, modified events notification and also folder created,deleted,renamed notification? How to get exact these notification? And How to used it? I don't need all notification.

output I get is this:

2014-02-12 13:09:14.607 TestSCEvent10-2[5189:503] SCEvent { eventId = 3348870, eventPath = /Users/user1/.Trash/untitled folder 1.09.13 PM, eventFlags = 133120 }
Its notifying me changed in the form of event_id, event_path and event_flags. But how should I get information which event is raise. Its not giving any details like File created event occurs, File Renamed event occur etc.

How should i get proper information about which event is raised?
Can we get notification type(like file created, file deleted etc.) using eventFlags? or is there any other way for this?

Please give me direction. Thanks...

Returning different value of _eventsFlags in SCEvents(FSEvents wrapper )?

I implemented file watcher part using SCEvents
Its giving output like this :

2014-02-11 16:08:38.725 TestSCEvent10-2[2995:403]
SCEvent {
eventId = 3182336,
eventPath = /Users/user1/Desktop,
eventFlags = 131328
}
Value of enum is :

kFSEventStreamEventFlagItemCreated = 0x00000100,
kFSEventStreamEventFlagItemRemoved = 0x00000200,
kFSEventStreamEventFlagItemInodeMetaMod = 0x00000400,
kFSEventStreamEventFlagItemRenamed = 0x00000800,
kFSEventStreamEventFlagItemModified = 0x00001000,
kFSEventStreamEventFlagItemFinderInfoMod = 0x00002000,
kFSEventStreamEventFlagItemChangeOwner = 0x00004000,
kFSEventStreamEventFlagItemXattrMod = 0x00008000,
kFSEventStreamEventFlagItemIsFile = 0x00010000,
kFSEventStreamEventFlagItemIsDir = 0x00020000,
kFSEventStreamEventFlagItemIsSymlink = 0x00040000

It register SCEvents flags with above value, and If we run the application and change the file contents or renamed the file the value of _eventsFlags is different. So i unable to know which file event is occured?

Please provide me direction...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.