FileSystemEventPublisher

3.0.0

A publisher that emits events in the file system.
kennethlaskoski/FileSystemEventPublisher

What's New

Version 3

2022-04-12T22:22:08Z

Added DocC documentation.

FileSystemEventPublisher

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 and was adopted for it's simplicity and performance.

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.

Description

  • Swift Tools 5.5.0
View More Packages from this Author

Dependencies

  • None
Last updated: Thu Mar 14 2024 00:26:39 GMT-0900 (Hawaii-Aleutian Daylight Time)