Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Determine when file is done being written?

by jwest (Friar)
on Jun 12, 2002 at 18:44 UTC ( #173955=note: print w/replies, xml ) Need Help??

in reply to Determine when file is done being written?

One alternative approach is to watch the log of the FTP server to see if the transfer has completed. This would require clever use of File::Tail and possibly the Net::FTPServer::XferLog modules.

The net result of this would be an event-driven methodology (dostuff() to a file when it is transfered in) as opposed to the polling methodology that you're using now.

Not that there's anything wrong with polling. As I say, it's just an alternative. Frankly, I'd be more inclined to do as you are, with the modifications suggested by Weasle.

Hope this helps!


-><- -><- -><- -><- -><-
All things are Perfect
    To every last Flaw
    And bound in accord
         With Eris's Law
 - HBT; The Book of Advice, 1:7
  • Comment on Re: Determine when file is done being written?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://173955]
[LanX]: <|--
[choroba]: Reminds me of an old joke about an orchestra...
erix imagines that in a true Lancs accent
[choroba]: so a Czech orchestra rehearses a new piece by a German composer
LanX LOL of the day ... the Turkish Anonymous Alcoholics stopped their "No to alcohol" campaign for political reasons ...
LanX omg my browser is posting again on its own ...
[LanX]: choroba: GREAT JOKE! xD
LanX starts googling the punch line ...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2017-03-27 11:48 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (319 votes). Check out past polls.