Skip to content

Library for getting asynchronous OS specific events in Pharo.

License

Notifications You must be signed in to change notification settings

ronsaldo/os-ioevents

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OS IO Events - Bindings to non-blocking IO Events in Pharo.


Loading in a Pharo image

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:

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
"

About

Library for getting asynchronous OS specific events in Pharo.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages