Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to make a file read only
Message
From
20/11/2007 12:19:02
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01270091
Message ID:
01270202
Views:
18
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform