Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to make a file read only
Message
De
20/11/2007 12:19:02
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01270091
Message ID:
01270202
Vues:
17
>hI
>I use Fcreate, Fputs and Fclose to create a Txt file.
>At the end of my creation, I want to have the file read only.
>I know Fcreate can do this, but then I cant write to the file.

You got the answer - I just want to correct this: fCreate()... but then I did some checking, and you're right, fCreate() CAN create a file into which you can't write! This is a fabulous way to paint yourself into a corner. And since the LLFF are actually just wrappers around system functions, it means that any piece of software that wants to create a read-only file can do it only the way we do it (i.e. see other answers): make a RW file, close it, set RO. It can create a RO file but then it can't write to it :).

Seems to be it was so even before Windows. Fox had LLFF in 2.0, IIRC.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform