in reply to The "readdir()" fails to detect files created after the call to "opendir()"

thejasviv:

If you're on a Linux box, I'd suggest looking at Linux::Inotify2 to detect changes in a directory.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

  • Comment on Re: The "readdir()" fails to detect files created after the call to "opendir()"

Replies are listed 'Best First'.
Re^2: The "readdir()" fails to detect files created after the call to "opendir()"
by SimonPratt (Friar) on Jan 20, 2015 at 12:50 UTC

    I'm not a Linux person, but was just thinking that even Windows has events to notify listeners about file system changes - Glad to see that Linux also does this

      SimonPratt:

      Yeah, I figured people may not be aware that Linux and MacOSX also have filesystem events available. I try to use filesystem events when I can, to avoid repeated directory scanning. Especially when many directories would need scanning.

      ...roboticus

      When your only tool is a hammer, all problems look like your thumb.