Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
List of FOpen()ed files
Message
 
 
À
04/05/1998 09:23:02
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00096689
Message ID:
00096772
Vues:
18
Dragan,

Just create a FileHandle class that lightly wraps the LLFF and keeps the handle in one of its properties. When it goes out of scope it can FClose() automatically in it's Destroy() method.

I think the output of LIST STATUS can be parsed for file handles.

>Assume you have a routine where you Fopen() or Fcreate() several files, and it breaks. You cancel it. The variables where the file handles were are lost. You issue Display Status, and the file handles, along with file names, are displayed (among other info, of course).
>
>Now is there any other way of obtaining this info programmatically, without having to keep track on what file was FOpen()ed and which variable keeps the handle? I know there may be a way to do it generally, like keeping a list of those in app object, but I need it for my (own) legacy software, namely for a general closing routine, which should not Close All (because then it closes my .vcx'es, too), but close some file types instead (close only tables, databases, procedure files, low-level files and such. Currently, it closes all and then reopens the classlibs, but I need a more versatile solution.
>
>Any neat tricks, anyone? How do I get a list all the low-level open files?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform