Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FOPEN - buffered vs. not
Message
From
29/09/2021 16:42:00
 
 
To
29/09/2021 15:39:19
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01682383
Message ID:
01682386
Views:
47
#2: using FOPEN() as files are indeed large and faster than FILETOSTR(); mind you, the difference is pretty small (using FOPEN() was typically 0.0000 to 0.0001 secs whereas FILETOSTR() usually completed in 0.06 secs). I only want to check the first 1000 characters as there is a "status" flag in the file header that I need before going on to the next step so using something like
LEFT(FILETOSTR("TestFile.pdf"),1000) TO lcString
seemed like overkill.

Thanks for responding.

>>Albert
>
>#1 buffered. but check FFLUSH.
>#2 why low level? Is there something FILETOSTR / STRTOFILE can not do? Like file to large? Else those both are much more easy then the low level functions.
>#3 I use fopen only to lock a file / check locking, never to read / write.
Previous
Reply
Map
View

Click here to load this message in the networking platform