Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ronsaldo/os-ioevents
Library for getting asynchronous OS specific events in Pharo.
https://github.com/ronsaldo/os-ioevents
Last synced: about 1 month ago
JSON representation
Library for getting asynchronous OS specific events in Pharo.
- Host: GitHub
- URL: https://github.com/ronsaldo/os-ioevents
- Owner: ronsaldo
- License: mit
- Created: 2020-02-05T02:21:32.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-16T00:56:05.000Z (over 3 years ago)
- Last Synced: 2023-08-10T07:47:06.275Z (over 1 year ago)
- Language: C
- Size: 95.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OS IO Events - Bindings to non-blocking IO Events in Pharo.
----
## Loading in a Pharo image```smalltalk
Metacello new
baseline: 'OSIOEvents';
repository: 'github://ronsaldo/os-ioevents';
load.
```## FileSystem monitor example
The following script is an example on how to use the file system monitoring library:```smalltalk
OSIOFileSystemMonitor on: '.' asFileReference when: OSIOFileEventCreate do: [ :ev |
Transcript show: 'Create '; show: ev fileReference; cr.
].
OSIOFileSystemMonitor on: '.' asFileReference when: OSIOFileEventDelete do: [ :ev |
Transcript show: 'Delete '; show: ev fileReference; cr.
].
subscription := OSIOFileSystemMonitor on: '.' asFileReference when: OSIOFileEventCloseWrite do: [ :ev |
Transcript show: 'Close Write '; show: ev fileReference; cr.
].
"
subscription unsubscribe
"
```