|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Sequential file access and binary file accessHi All,
I have a .txt file, whose contents need to be read and processed. Which among the following is the best way to do it? - Using Sequential file access functions (FileOpen, LineInput, etc) - Using binary file access functions (File.Open, FileGet, etc) Thanks, kd KD,
For me the best choise is not between them, that is the Streamreader, the speed of a file on disk is never faster than that the disk, which is always slower than your program, so for performance you should not look for this. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemiostreamreaderclasstopic.asp I hope this helps, Cor Hi Cor,
When should one use sequential file access and when to use binary acess to read .txt files? Thanks, kd Show quoteHide quote "Cor Ligthert" wrote: > KD, > > For me the best choise is not between them, that is the Streamreader, the > speed of a file on disk is never faster than that the disk, which is always > slower than your program, so for performance you should not look for this. > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemiostreamreaderclasstopic.asp > > I hope this helps, > > Cor > > > KD,
When all characters(bytes) are readable as txt file, you should in my opinion never use the binary access. However just my thought, I never tried it because I even don't think about another way. Cor
HLP: Retrieving ListView String Information
Question on updating data ?syntax to recognize code in a 2nd file Scripting Runtime ARRAYLIST ADDING A CLASS Checking a string for valid date sockets O.T.:Shameless Plug to get Free Software(for me & for you too) How to provide hint on sub params? socket class |
|||||||||||||||||||||||