Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: make infinite loop for live directory

by Laurent_R (Canon)
on Oct 27, 2019 at 21:31 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11108024]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-20 15:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found