Swiftpack.co - kennethlaskoski/FileSystemEventPublisher as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by kennethlaskoski.
kennethlaskoski/FileSystemEventPublisher 3.0.0
A publisher that emits events in the file system.
⭐️ 9
🕓 2 years ago
iOS macOS
.package(url: "https://github.com/kennethlaskoski/FileSystemEventPublisher.git", from: "3.0.0")

FileSystemEventPublisher

Swift CircleCI GitHub

A publisher that emits events in the file system.

Overview

The FileSystemEventPublisher framework wraps a Combine Publisher around a DispatchSourceFileSystemObject, providing a modern high-level interface to an efficient way of monitoring filesystem events.

Usage

A typealias and a function are all the exposed interface, the Combine framework provides all remaining functionality.

The publisher is created by a function with two parameters: a file and a set of events; this signature reflects the underlying DispatchSource interface.

The first parameter is a mask containing events of interest. The set of events are defined by a typealias to DispatchSoutce.FileSystemEvent. This type is also the Output of the created publisher, i.e., the type of values to be delivered to subscribers.

The second parameter is a FileDescriptor pointing to an open file, folder or socket.

The package includes a playground with a short example code.

GitHub

link
Stars: 9
Last commit: 1 year ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

Version 3
2 years ago

Added DocC documentation.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics