Determining when a file has finished copying

Cameron Simpson cs at zip.com.au
Thu Jul 10 18:37:53 EDT 2008


On 10Jul2008 13:20, Manuel Vazquez Acosta <mva.led at gmail.com> wrote:
| Cameron Simpson wrote:
| > On 09Jul2008 15:54, Ethan Furman <ethan at stoneleaf.us> wrote:
| >> The solution my team has used is to monitor the file size.  If the file  
| >> has stopped growing for x amount of time (we use 45 seconds) the file is  
| >> done copying.  Not elegant, but it works.
| > 
| > If you know that files appear in sequence (a single serial upload
| > process, not multiple uploaders) you can augument this with a check
| > that an additional file has started to upload, ergo the current file
| > has finished. Of course, only you can decide if this might be relied upon.
| 
| Hum, what about the last file in the sequence?
| I think polling file's size maybe a good indicator, as Ethan proposed.

Hence the word "augument". It may let you short circuit the time delay, if a
new file appears. Obviously it's not enough on its own.
-- 
Cameron Simpson <cs at zip.com.au> DoD#743



More information about the Python-list mailing list