getting size using dirents structures

N

nicolasdban

Hi, I'm having a problem trying to get the filesizes of archives given
by the list of dirents structures.
what i mean is this: to find out the size of any archive i use ftell
and it works just fine, well, when i use the list of dirents the size i
get is not correct. why?
 
K

Keith Thompson

Hi, I'm having a problem trying to get the filesizes of archives given
by the list of dirents structures.
what i mean is this: to find out the size of any archive i use ftell
and it works just fine, well, when i use the list of dirents the size i
get is not correct. why?

"dirents" are not a feature of standard C. It sounds like they're
components of some kind of archive, but there are many kinds of
archives, none of which are features of standard C.

You'll need to ask in a newsgroup that's specific to whatever system
you're using.
 
F

Flash Gordon

Hi, I'm having a problem trying to get the filesizes of archives given
by the list of dirents structures.
what i mean is this: to find out the size of any archive i use ftell
and it works just fine, well, when i use the list of dirents the size i
get is not correct. why?

The C programming language knows nothing of dirents whatever they may
me. As to using ftell to determine the file size, that is not portable
either since the only requirement is that it be suitable for fseek, not
that it be a byte count.

If you want to know file sizes and why a specific implementation gives
specific results when you use certain methods you will have to ask in a
group dedicated to your platform, but only after checking the groups FAQ
and a few days worth of posting and try using Google to search the group
for an answer (obtaining file sizes has been discussed here several
times in the past). This advice is to help *you* not just keep this
group topical, since on the correct group any misinformation is far more
likely to be corrected.

To me dirent makes it sound like you might be using a unix like system,
so comp.unix.programmer might be a suitable place to ask.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top