Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: make infinite loop for live directory

by Laurent_R (Canon)
on Oct 27, 2019 at 21:31 UTC ( #11108024=note: print w/replies, xml ) Need Help??

in reply to make infinite loop for live directory

You could keep track of a time stamp on the last file fetch date and retrieve only the files whose last modification date is more recent.

Of course, if the directory is very dynamic, you might get files that are still being written (depending on your OS: for example, it wouldn't be possible to read a file that is being written under VMS, but that's entirely possible under most Unix/Linux flavors). That's not the question you asked, but it is often possible to find a delay that will prevent working on files being written.

  • Comment on Re: make infinite loop for live directory

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11108024]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2023-03-22 20:04 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (60 votes). Check out past polls.