Skip to content

Commit

Permalink
Setting version (0.0.2), updating History, README, and Manifest for c…
Browse files Browse the repository at this point in the history
…hanges.
  • Loading branch information
ymendel committed Jun 17, 2008
1 parent 8811159 commit bfec93a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
5 changes: 5 additions & 0 deletions History.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
== 0.0.2 2008-06-17

* 1 tiny enhancement:
* Extending the events array with #files and #modified_files.

== 0.0.1 2008-06-15

* 1 major enhancement:
Expand Down
3 changes: 3 additions & 0 deletions Manifest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ config/hoe.rb
config/requirements.rb
lib/fsevents.rb
lib/fsevents/event.rb
lib/fsevents/ext.rb
lib/fsevents/ext/array.rb
lib/fsevents/stream.rb
lib/fsevents/version.rb
script/console
script/destroy
script/generate
setup.rb
spec/event_array_spec.rb
spec/event_spec.rb
spec/fsevents_spec.rb
spec/spec.opts
Expand Down
18 changes: 13 additions & 5 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,18 @@
end
stream.run

Try that and make some new files in /tmp. Exciting, isn't it?

FSEvents::Stream.watch takes some options, most of which I fully admit I don't understand because I have little desire to read the documentation on FSEvents itself. One obvious option is latency, which the number of seconds to wait until an event is reported. A higher number allows FSEvents to bundle events.
Try that and make some new files in /tmp. Exciting, isn't it?

And for the common case of wanting to process every modified file no matter which subdirectory it happens to be under, the events array is extended for your convenience.

require 'fsevents'

stream = FSEvents::Stream.watch('/tmp') do |events|
p events.modified_files
end
stream.run

FSEvents::Stream.watch takes some options, most of which I fully admit I don't understand because I have little desire to read the documentation on FSEvents itself. One obvious option is latency, which the number of seconds to wait until an event is reported. A higher number allows FSEvents to bundle events.

stream = FSEvents::Stream.watch('/tmp', :latency => 15) {} # default is 1.0

Expand Down Expand Up @@ -72,15 +81,14 @@

stream.stop

A stream can also be invalidated and release it.
A stream can also be invalidated and released.

stream.invalidate

stream.release

stream.shutdown # stops, invalidates, and releases the stream


From what I can tell, entering the run loop requires an interrupt to get back out. Bear that in mind.

== REQUIREMENTS:
Expand Down
2 changes: 1 addition & 1 deletion lib/fsevents/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Fsevents #:nodoc:
module VERSION #:nodoc:
MAJOR = 0
MINOR = 0
TINY = 1
TINY = 2

STRING = [MAJOR, MINOR, TINY].join('.')
end
Expand Down

0 comments on commit bfec93a

Please sign in to comment.