update
This commit is contained in:
		
					parent
					
						
							
								31c15aa9b9
							
						
					
				
			
			
				commit
				
					
						ec197feec0
					
				
			
		
					 1 changed files with 18 additions and 5 deletions
				
			
		| 
						 | 
					@ -20,9 +20,12 @@ I'd also like to support OSX and if possible the BSDs.
 | 
				
			||||||
* kqueue ([haskell bindings](http://hackage.haskell.org/package/kqueue))
 | 
					* kqueue ([haskell bindings](http://hackage.haskell.org/package/kqueue))
 | 
				
			||||||
  is supported by FreeBSD, OSX, and other BSDs.
 | 
					  is supported by FreeBSD, OSX, and other BSDs.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  From what I can find, kqueue does not provide full directory watching
 | 
					  In kqueue, to watch for changes to a file, you have to have an open file
 | 
				
			||||||
  capabilities. To watch a file, you have to have an open file descriptor
 | 
					  descriptor to the file. This wouldn't scale. 
 | 
				
			||||||
  to the file. This wouldn't scale.
 | 
					
 | 
				
			||||||
 | 
					  Apparently, a directory can be watched, and events are generated when
 | 
				
			||||||
 | 
					  files are added/removed from it. You then have to scan to find which
 | 
				
			||||||
 | 
					  files changed. [example](https://developer.apple.com/library/mac/#samplecode/FileNotification/Listings/Main_c.html#//apple_ref/doc/uid/DTS10003143-Main_c-DontLinkElementID_3)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Gamin does the best it can with just kqueue, supplimented by polling.
 | 
					  Gamin does the best it can with just kqueue, supplimented by polling.
 | 
				
			||||||
  The source file `server/gam_kqueue.c` makes for interesting reading.
 | 
					  The source file `server/gam_kqueue.c` makes for interesting reading.
 | 
				
			||||||
| 
						 | 
					@ -30,6 +33,12 @@ I'd also like to support OSX and if possible the BSDs.
 | 
				
			||||||
  ([haskell bindings](http://hackage.haskell.org/package/hlibfam) for FAM;
 | 
					  ([haskell bindings](http://hackage.haskell.org/package/hlibfam) for FAM;
 | 
				
			||||||
  gamin shares the API)
 | 
					  gamin shares the API)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  kqueue does not seem to provide a way to tell when a file gets closed,
 | 
				
			||||||
 | 
					  only when it's initially created. Poses problems..
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  * [man page](http://www.freebsd.org/cgi/man.cgi?query=kqueue&apropos=0&sektion=0&format=html)
 | 
				
			||||||
 | 
					  * <https://github.com/gorakhargosh/watchdog/blob/master/src/watchdog/observers/kqueue.py> (good example program)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* hfsevents ([haskell bindings](http://hackage.haskell.org/package/hfsevents))
 | 
					* hfsevents ([haskell bindings](http://hackage.haskell.org/package/hfsevents))
 | 
				
			||||||
  is OSX specific.
 | 
					  is OSX specific.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -40,8 +49,12 @@ I'd also like to support OSX and if possible the BSDs.
 | 
				
			||||||
  This will be harder for me to develop for, since I don't have access to
 | 
					  This will be harder for me to develop for, since I don't have access to
 | 
				
			||||||
  OSX machines..
 | 
					  OSX machines..
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  [This perl module](http://search.cpan.org/~agrundma/Mac-FSEvents-0.02/lib/Mac/FSEvents/Event.pm)
 | 
					  hfsevents does not seem to provide a way to tell when a file gets closed,
 | 
				
			||||||
  has the best description I've found of what the flags mean.
 | 
					  only when it's initially created. Poses problems..
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  * <https://developer.apple.com/library/mac/#documentation/Darwin/Conceptual/FSEvents_ProgGuide/Introduction/Introduction.html>
 | 
				
			||||||
 | 
					  * <http://pypi.python.org/pypi/MacFSEvents/0.2.8> (good example program)
 | 
				
			||||||
 | 
					  * <https://github.com/gorakhargosh/watchdog/blob/master/src/watchdog/observers/fsevents.py> (good example program)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Windows has a Win32 ReadDirectoryChangesW, and perhaps other things.
 | 
					* Windows has a Win32 ReadDirectoryChangesW, and perhaps other things.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue