fairdox
September 26th, 2005, 05:35 PM
Hi,
I have a very simple server that receives transactions by file (I don’t use any type of messaging, signalling, or inter process communication)
Now is there a better way to wait for a new file being created in my input directory, than simply polling the directory every half a second?
What I’m looking for is a callback function or even a blocking function that returns when a new file has been created in a directory.
Or perhaps a hook in file system that notifies my process that a new file is available.
The directory is shared, so the file can be created by another PC on the LAN.
Thank you.
I have a very simple server that receives transactions by file (I don’t use any type of messaging, signalling, or inter process communication)
Now is there a better way to wait for a new file being created in my input directory, than simply polling the directory every half a second?
What I’m looking for is a callback function or even a blocking function that returns when a new file has been created in a directory.
Or perhaps a hook in file system that notifies my process that a new file is available.
The directory is shared, so the file can be created by another PC on the LAN.
Thank you.