Wow. I was looking for something like this. I was using Captain FTP and their companion app Crowznest. Only problem is, THEY DIDN'T WORK RIGHT! I may look into this as an alternative means of managing watch folders.

I know from talking with Tech Support that the Mac OS does in fact have a mechanism for setting up and generating an event when the contents of a folder have changed. But therein lies a difficulty. When does the event get generated? If I copy 10 large files to a network share, the OS will generate the event right away, but not all the files are there yet. Any software reacting to that event will not get "the full picture" of what happened, and that is exactly what was happening to me. Some files get processed by Captain FTP, some do not. And what happens if my "watcher" app was not running at the time the event was generated? NOTHING gets processed.

Your solution (which I presume checks the the present condition against the last know condition) might be just exactly the thing I am looking for. Now if I had a means to FTP the file directly from Revolution and not proceed with the next until the first file was finished, I would be golden. I am FTPing to a tape drive that has an FTP interface, but the read/writes are by nature linear so only one stream can occur at one time. This may be the perfect answer to the problem.

Bob Sneidar
IT Manager
Logos Management
Calvary Chapel CM

On Jan 21, 2009, at 9:10 AM, Richard Gaskin wrote:

viktoras wrote:
why not instead let user choose folders or files that should be
monitored and then monitor these by comparing files (get files etc...), folders (get folders) regularly. Use recursion to get into sub folders,
etc. Revolution is fast enough to do this efficiently.

That's an excellent idea.  I was curious about how responsive it would
be, so I took a couple minutes to throw together an example of this and
it seems reasonably efficient.

I've posted the example to RevNet - in Rev, choose
Development->Plugins->GoRevNet, and in RevNet look for "4W Folder
Watcher" in the Stacks section.

This modest example lets you pick a folder and it checks for changes to files (name, size, additions, deletions). It also provides a slider to
govern the interval between checks so you can experiment to find the
best balance between system overhead and responsiveness.

One useful aspect of it is that the folder watching hander accepts the
name of a callback handler as a param, so you can handle the change
event however you like without having to modify the folder watcher
handler itself.

This is a very simple example, with lots of room for improvements like
also checking folder changes within the target folder, and possibly
sending additional info about exactly what changed to the callback
handler if needed.

But as a quick-n-dirty experiment, at least it shows that Rev can be
used to monitor changes to folder contents with relative ease and
acceptable efficiency for many uses, and on all supported platforms.

--
 Richard Gaskin
 Fourth World
 Revolution training and consulting: http://www.fourthworld.com
 Webzine for Rev developers: http://www.revjournal.com
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to