daniel-pedersen / skqueue Goto Github PK
View Code? Open in Web Editor NEWMonitor changes to files and directories using kernel event notifications (kqueue) in Swift
License: MIT License
Monitor changes to files and directories using kernel event notifications (kqueue) in Swift
License: MIT License
Hello,
I've been playing with SKQueue and noticed that the path is always the folder which is being watched. Not the file that was created or modified. Is this on purpose?
So it seems like this library is still growing in popularity. I'm guessing the ease of use is appealing.
Some background: I wrote this library back in 2014 when Swift was still unstable and I needed kqueue functionality for a project. Today I would have used the DispatchSource API, which exposes kqueue functionality optimized for GCD.
But if y'all like this API I'll consider maintaining it.
Any thoughts on porting this to Swift 4?
Cheers
Hey, first of all thanks for a great lib! I'm using it with success to watch files.
One thing I noticed is that, if I watch a folder and some files contained in it (I'm not even sure I can add folder paths but it doesn't throw an error and isPathWatched
returns true for folders too), then moving the folder's location on disk will not post any notification, not on the folder path nor the files' paths.
Is there a way to make this work without too much hassle? It's weird that even the files inside the moved folder don't trigger a notif.
Thanks!
Hi,
i tried this to get run. Every time I change a file in one of the folders tracked, I get a "Write" notification, even if I rename a file. You have a long list of different cases, but it seems 2 is the only number returned (= Write).
Is this a bug or a feature? ;-)
Dirk
P.S.: I'm using Xcode 7.3 and OSX 10.11.6
Hey @daniel-pedersen, now that #12 is merged, would you mind tagging a new release? This would help packages depending on SKQueue, as they could specify a release tag in their dependencies instead of master
. Depending on master
directly sometimes leads to issues, especially when integrating SwiftPM dependencies with Xcode. Thanks!
Couldn't really get things to work reliably.
I monitor a simple html file. If I open it in TextWrangler it works, but if I open it in Xcode (9.4.1) or Coda (2.6.10), then I get a "Rename" notification then nothing. This is on 10.13.6
Any ideas?
L
Changes in sub folders are not detected.
What would it take to detect sub folder detection?
Hi, great lib!
I'm making an application that continually saves state-files to disk. I'd like to be able to use e.g. a DropBox folder as storage. If the files is modified from another computer and synched with dropbox i'd like to get a notification so I can reload my cached in app state. I would like to filter away my own local modifications and only get notified by other processes modifications. Is it possible to somehow get what process that modified the file? It would be nice to not have to constantly read the files after modifications and compare them to my local cache.
i see first mod, but then, I do not see nothing else if I continue modify!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.