Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking for file transfer completion
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00353899
Message ID:
00354052
Vues:
17
Simple, elegant and it works. Thanks Ed.

>>Is there any way in VFP6.0 that you can check if a file has finished writing to a directory? We have a program that checks a directory to see if a file has been FTPed in.
>>
>>I am looking for a way to determine that the file has completed it’s transfer and it is now safe to move or use.
>>
>
FUNCTION IsItSoupYet
>LPARAMETER cAbsoluteFilePath
>LOCAL nFH
>nFH = -1
>IF FILE(FULLPATH(cAbsoluteFilePath))
>   nFH = FOPEN(FULLPATH(cAbsoluteFilePath),12)
>   IF nFH # -1
>      =FCLOSE(nFH)
>   ENDIF
>ENDIF
>RETURN (nFH # -1)
Steve McMahon
ZDI
San Diego
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform