Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to determine if a text file is in use
Message
De
11/08/2003 07:48:51
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
10/08/2003 18:02:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00815356
Message ID:
00818831
Vues:
24
>A better question might be, HOW to determine the low-level Handle of a Text file that is already open?
>
>Obviously we can use FOPEN() to retrieve an error code, and FERROR() likewise. However there seems to be no way to access a file which was previously opened... and no way to close it, or otherwise re-Open with a new Handle.

Yes,
But this is a bad programming. If you need a variable somewhere else then you need a way to keep it in scope.
Sergey's suggestion of listing status works to a point. It lists the files as shortened for display paths. IOW you might be closing the wrong one.
lnMAX = 32767 && I don't know what to chose for this actually
for ix=1 to lnMAX
 fclose(ix)
endfor
works to close all opened. Might get handles from list status output.

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform