File Reading Progress.

BlitzMax Forums/BlitzMax Programming/File Reading Progress.

plash(Posted 2006) [#1]
So here is my problem, I have to show the progress of reading all the files in a folder, I was going to approach it by changing the progress by how many lines have been read to the amount of lines in the file.. But how can I get the lines in the file without reading the file and adding 1 to the amount of lines each time I read a line?

Or is there some kind of approach where I can check how many more bytes are available to read?


plash(Posted 2006) [#2]
I guess I didn't look at the declaration of Eof, is just returns true or false, not bytes available..

I've solved the problem using StreamPos, you can tell me to look into things more before I spam this forum :D


bradford6(Posted 2006) [#3]
you have streampos()
EDIT: i see you found that, anyway, have fun with the code:




Beaker(Posted 2006) [#4]
Try something like this:
File nibbler


smilertoo(Posted 2006) [#5]
Its nice to see how long a load will take, but dont make it 2x longer just to see a progress bar.


plash(Posted 2006) [#6]
Its nice to see how long a load will take, but dont make it 2x longer just to see a progress bar.
I realize that, but these files are small so it doesn't matter.


bregors(Posted 2006) [#7]
.


plash(Posted 2006) [#8]
... just count the number of files to load ...
Who said I was loading a ton of small files?

I'm just doing file progress because I want to know if my app has gotten stuck or something of that sort.


bregors(Posted 2006) [#9]
.


plash(Posted 2006) [#10]
@Plash:
From the beginning of this thread:
:I have to show the progress of reading all the files in a file
Never noticed that before, it should be "I have to show the progress of reading all the recently viewed (5) files in a folder", its just a simple typing-too-fast typo.

BTW, I don't recall mentioning anything about a "ton" of anything.
I was expressing what you said, now I know why you said it how you did, because of my typo in the first post.


bregors(Posted 2006) [#11]
.


plash(Posted 2006) [#12]
oh ok. It's alllll good.
Never wanted to start a war :)