Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
List of FOpen()ed files
Message
 
 
To
04/05/1998 09:23:02
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00096689
Message ID:
00096772
Views:
17
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform