File Reading Progress.
BlitzMax Forums/BlitzMax Programming/File Reading Progress.
| ||
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? |
| ||
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 |
| ||
you have streampos() EDIT: i see you found that, anyway, have fun with the code: |
| ||
Try something like this: File nibbler |
| ||
Its nice to see how long a load will take, but dont make it 2x longer just to see a progress bar. |
| ||
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. |
| ||
. |
| ||
... 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. |
| ||
. |
| ||
@Plash: 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.From the beginning of this thread: :I have to show the progress of reading all the files in a file 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. |
| ||
. |
| ||
oh ok. It's alllll good. Never wanted to start a war :) |