[MacRuby-devel] [MacRuby] #483: Need GCD wrapper for File (Vnode) Sources

MacRuby ruby-noreply at macosforge.org
Fri Dec 4 11:08:27 PST 2009


#483: Need GCD wrapper for File (Vnode) Sources
----------------------------------------+-----------------------------------
 Reporter:  ernest.prabhakar@…          |       Owner:  lsansonetti@…        
     Type:  enhancement                 |      Status:  new                  
 Priority:  blocker                     |   Milestone:  MacRuby 0.5          
Component:  MacRuby                     |    Keywords:                       
----------------------------------------+-----------------------------------
 We should wrap DISPATCH_SOURCE_TYPE_VNODE

 http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man3/dispatch_source_create.3.html

 file_source = Dispatch::Source.for_file(queue, io, mask, &block)

 As with PROC, the key is coming up with the right "bitfield" class to
 represent the event types:

            o DISPATCH_VNODE_DELETE  The referenced node was removed from
 the filesystem namespace via unlink(2).

            o DISPATCH_VNODE_WRITE   A write to the referenced file
 occurred

            o DISPATCH_VNODE_EXTEND  The referenced file was extended

            o DISPATCH_VNODE_ATTRIB  The metadata attributes of the
 referenced node have changed

            o DISPATCH_VNODE_LINK    The link count on the referenced node
 has changed

            o DISPATCH_VNODE_RENAME  The referenced node was renamed

            o DISPATCH_VNODE_REVOKE  Access to the referenced node was
 revoked via revoke(2) or the underlying fileystem was unmounted.

 e.g.,: Dispatch::Source::FileEvent.new(:delete, :write, :extend, :attrib,
 :link, :rename, :revoke)

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/483>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list