in reply to Net:FTP Not overwrite files
How about uploading the file to a temp name? After the temp file is done check to see if the real file is there. If it is do something with the temp file like delete it, or rename it to the real file name if it's not there. That "should" handle the race condition. Of course, on a busy server you might still run into issues there.
If you're looking for a way to determine whether the file exists or not you could eval a $ftp->get for the file or query the output of a $ftp->dir.
|
|---|