Page 1 of 1 1
Topic Options
#152183 - 2005-11-24 01:46 AM Read file without loading it into memory
jakelegged Offline
Lurker

Registered: 2005-11-24
Posts: 4
Hey everyone,

I have a quick question that hopefully someone can answer. I'm trying to read the first line of a text file without loading the entire file into memory. The Open() function loads the entire file, so I'm not sure it will work in this case.

In case anyone is interested, the reason I'm doing this is because the files are raw database dumps. Most of them are 100+ MB in size. As this is a production server, I'm trying not to use any more resources than necessary.

Any help is greatly appreciated.

Top
#152184 - 2005-11-24 02:04 AM Re: Read file without loading it into memory
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Yes, there are COM methods that have been discussed.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#152185 - 2005-11-24 06:35 AM Re: Read file without loading it into memory
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
kixforms.net as one.
_________________________
!

download KiXnet

Top
#152186 - 2005-11-26 12:12 AM Re: Read file without loading it into memory
jakelegged Offline
Lurker

Registered: 2005-11-24
Posts: 4
Quote:

kixforms.net as one.


???

Thanks for the reply, but I'm not quite sure what that means

Top
#152187 - 2005-11-26 01:24 AM Re: Read file without loading it into memory
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
KiXforms is GUI for KiXtart created by Shawn Tassie of Canada.


http://www.kixforms.org

KiXforms.NET Discussion
http://www.kixforms.org/forum/viewforum.php?f=7
 

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 447 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.163 seconds in which 0.138 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org