Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2020-10-01 05:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (175 votes). Check out past polls.

    Notices?