Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to detect a file update
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01324776
Message ID:
01324852
Vues:
23
>Gary,
>
>I think that subscribing to file events is not reliable anyways, what I found (and I think I read it somewhere, but I cannot find it now) is that if several events are happening simultaneously in (or is it on?) the folder, like many files being updated, then Windows will consolidate all the file messages into one updated folder message, so if you are strictly watching for the file event you will miss it.
>
>In my case, where this was to be expected (you can read details in the thread Naomi pointed), I was only interested in creation and deletion of files, but I subscribed to the folder events (updated) and then check for the file existence manually (using adir) to fire the event (a pseudo file created or file deleted). You could do something similar by retaining the info of the file (columns 3 and 4 of the array created with ADIR) and comparing old and new values to determine if the folder updated event was indeed fired by a modification of the file you are interested

Does it work reliably if you only have one file in that particular folder?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform