Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FOPEN() fail faster?
Message
De
27/09/2007 11:31:27
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
26/09/2007 17:54:22
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01255774
Message ID:
01257208
Vues:
24
>>>>So first question. Is there a way to make VFP force Windows to "refresh" itself?
>>>
>>>Forget exploder, it's unreliable. What does fsize() say at that time?
>>
>>No idea. I'm using ADIR and the two numbers match whenever I refresh Explorer. Until I do that, the ADIR reports the same number repeatedly. I'd hope fsize does the same.
>
>There may be other ways to measure the current size of a file beyond relying on the shell application.
>
>- !dir *.bak>size.txt followed by filetostr("size.txt") and analysis thereof
>- FSO object (though I think that's what Xploder uses internally so that's expected to return the same, unless it actually is accurately refreshing, just not told to :)
>- fopen() read only, with fseek() to eof - good old technique
>- list files like *.bak to size.txt (then do like in 1)
>- and I wouldn't throw fsize() away - it may have been written long before people started using Windowses to ask for file sizes, and may still do it its own way

OK. I've also tried fopen(,0), buffered readonly. Not reporting size change no matter if I refresh in Explorer or not.

I don't know if I can use FSO. I do know ADIR seems to be working on Win2K. :s
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform