Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any way to lock a file that is not a .dbf table?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00354616
Message ID:
00355429
Views:
19
>>is there on the disk but it has a size of zero.
>
>I believe fopen() will open a file of zero bytes.
>I haven't tested it tho.

Yep - as long as the file exists, FOPEN() will open it regardless of length if it can get the needed rights for it. To prove this:

cFileName = SYS(2015)
nFH=FCREATE(cFilename) && open for output
=FCLOSE(nFH) && close but write nothing to the file
? FSIZE(cFileName) && empty file = 0 length
? FOPEN(cFileName) && anything but -1 is OK...
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform