[Gambas-user] What is faster: OPEN or File.Load?

Rolf-Werner Eilert eilert-sprachen at ...221...
Fri May 27 12:14:25 CEST 2011


When I have different directories which contain text files, and I have 
to open each file and read only the first line of it, which one will be 
faster and more efficient:

FOR
	OPEN
   		read first line
	CLOSE
	list.Add
NEXT

or

FOR
	File.Load(...)
	Split(... chr$(10))
	list.Add(...)
NEXT

Or wouldn't that be feasible in case of, say, 50 - 70 files in such 
directories?

Thanks for your comments :-)

Rolf




More information about the User mailing list