SKQueue is a Swift libary used to monitor changes to the filesystem.
It wraps the part of the kernel event notification interface of libc, kqueue.
This means SKQueue has a very small footprint and is highly scalable, just like kqueue.
Requirements
Swift tools version 4
To build in older environments just replace Package.swift with this file.
Installation
Swift Package Manager
To use SKQueue, add the code below to your dependencies in Package.swift.
Then run swift package fetch to fetch SKQueue.
To monitor the filesystem with SKQueue, you first need a SKQueueDelegate instance that can accept notifications.
Paths to watch can then be added with addPath, as per the example below.
SKQueue
SKQueue is a Swift libary used to monitor changes to the filesystem. It wraps the part of the kernel event notification interface of libc, kqueue. This means SKQueue has a very small footprint and is highly scalable, just like kqueue.
Requirements
To build in older environments just replace
Package.swift
with this file.Installation
Swift Package Manager
To use SKQueue, add the code below to your
dependencies
inPackage.swift
. Then runswift package fetch
to fetch SKQueue.Usage
To monitor the filesystem with
SKQueue
, you first need aSKQueueDelegate
instance that can accept notifications. Paths to watch can then be added withaddPath
, as per the example below.Example
/Users/steve/Documents
["Write"] @ /Users/steve/Documents
/Users/steve/Documents
["Write", "SizeIncrease"] @ /Users/steve/Documents
/Users/steve/Documents/dog.jpg
["Rename", "SizeIncrease"] @ /Users/steve/Documents/dog.jpg
Contributing
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature