Skip to contentSkip to conversation

file creation detection

DISCUSSION Luciano - igLnx 2 participants 2 messages Jun 3, 2002 VFS

lore
Share & tools
lore
#0 lore raw

How to detect file creation in a directory ?

I need to do a program that stay monitoring a directory looking for new files, but I think that use of "timers" is not the best pratice to build efficient application. Then, I'm looking for resources (system calls, etc) that keep the program in idle mode until a occurency of file creation events, etc.

Thanks,
Luciano.

#1 lore raw

Hi Luciano,

Quoted 8 lines · On Mon, 3 Jun 2002 09:23:01 -0300 "Luciano - igLnx" <[email protected]>…

How to detect file creation in a directory ?

I need to do a program that stay monitoring a directory looking for new files, but I think that use of "timers" is not the best pratice to build efficient application. Then, I'm looking for resources (system calls, etc) that keep the program in idle mode until a occurency of file creation events, etc.

See Documentation/dnotify.txt

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/