Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fcreate() question
Message
De
17/10/2000 03:33:57
 
 
À
17/10/2000 02:30:21
Tom Gahagan
Alliance Computer Solutions
Thomaston, Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00430190
Message ID:
00430196
Vues:
16
Tom,

The following line *does* create a hidden read/write file

lnHandle = FCREATE("c:\temp\test.txt", 2)

However, you cannot write to the file:

?FWRITE(lnHandle, "Hi") && Returns 0, FERROR() = 5 (Access denied)

you need to close and open the file again:

FCLOSE(lnHandle)
lnHandle = FOPEN("c:\temp\test.txt", 2)

?FWRITE(lnHandle, "Hi") && works

This behaviour is documented in the help file:

Note that a file created with nFileAttribute other than 0 cannot be written to with FPUTS( ) or FWRITE( ) until the file is closed and opened again.

<
The docs say that using the #2 as the second parameter will create a hidden file. It does that but it is also read only (the docs give the impression that using #2 will be read/write). Further they say that using #3 will create a read only hidden file. Using #3 the file is read only but NOT hidden.

Anyone know how to get a hidden read/write file?>>
Daniel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform