Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > getting size using dirents structures

Reply
Thread Tools

getting size using dirents structures

 
 
nicolasdban@gmail.com
Guest
Posts: n/a
 
      10-18-2005
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?

 
Reply With Quote
 
 
 
 
Keith Thompson
Guest
Posts: n/a
 
      10-18-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) writes:
> 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.

--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
 
Reply With Quote
 
 
 
 
Flash Gordon
Guest
Posts: n/a
 
      10-18-2005
(E-Mail Removed) wrote:
> 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.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Preferred Size, Minimum Size, Size Jason Cavett Java 5 05-25-2008 08:32 AM
Getting picture size/setting window size jodleren Javascript 2 02-15-2007 12:35 PM
mega pixels, file size, image size, and print size - Adobe Evangelists Frank ess Digital Photography 0 11-14-2006 05:08 PM
structures, structures and more structures (questions about nestedstructures) Alfonso Morra C Programming 11 09-24-2005 07:42 PM
Type Casting IPv4 and IPv6 structures to Generic Structures tweak C Programming 14 06-11-2004 02:43 PM



Advertisments