Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fcreate() question
Message
From
17/10/2000 03:33:57
 
 
To
17/10/2000 02:30:21
Tom Gahagan
Alliance Computer Solutions
Thomaston, Georgia, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00430190
Message ID:
00430196
Views:
14
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform