in reply to Continuously polling multiple directories for file transfer?
What's "most efficient" usually somewhat depends on the context, so I'll refrain from making absolute statements here... But generally, event based notification frameworks scale better than polling, i.e. in this case, when the number of files/directories gets large, the resources required to perform the same task will be less.
What's available in this respect depends on the OS you're using. For example, on Linux, there's inotify, for which exists the Perl binding Linux::Inotify2.
The basic idea is to register handlers that are being called by the notification system (via hooks in the kernel) when certain events happen, like file creation, etc.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Continuously polling multiple directories for file transfer?
by Corion (Patriarch) on Feb 10, 2009 at 12:46 UTC | |
|
Re^2: Continuously polling multiple directories for file transfer?
by Anonymous Monk on Feb 10, 2009 at 23:27 UTC |