getting size using dirents structures

Discussion in 'C Programming' started by nicolasdban@gmail.com, Oct 18, 2005.

  1. Guest

    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?
     
    , Oct 18, 2005
    #1
    1. Advertising

  2. 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) <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.
     
    Keith Thompson, Oct 18, 2005
    #2
    1. Advertising

  3. Flash Gordon Guest

    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.
     
    Flash Gordon, Oct 18, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dave Thompson

    Re: Structures of indefinite size

    Dave Thompson, Jun 26, 2003, in forum: C Programming
    Replies:
    0
    Views:
    769
    Dave Thompson
    Jun 26, 2003
  2. tweak
    Replies:
    14
    Views:
    2,814
    Eric Sosman
    Jun 11, 2004
  3. Alfonso Morra
    Replies:
    11
    Views:
    740
    Emmanuel Delahaye
    Sep 24, 2005
  4. Jason Cavett

    Preferred Size, Minimum Size, Size

    Jason Cavett, May 23, 2008, in forum: Java
    Replies:
    5
    Views:
    12,694
    Michael Jung
    May 25, 2008
  5. jodleren

    Getting picture size/setting window size

    jodleren, Feb 14, 2007, in forum: Javascript
    Replies:
    2
    Views:
    172
    jodleren
    Feb 15, 2007
Loading...

Share This Page