473,395 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

getting size using dirents structures

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?

Nov 15 '05 #1
2 1169
ni*********@gmail.com 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) ks***@mib.org <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.
Nov 15 '05 #2
ni*********@gmail.com 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.
Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Alexander Tulai | last post by:
Hi, I've started using Java recently so the question may seem trivial. Is it possible to get rid of an object by simply creating a method (let's call it "die") in which one simply includes the...
2
by: Luca | last post by:
I have the following problem: I'm developing a system where there are some processes that communicate each other via message queues; the message one process can send to another process is as...
7
by: ANaiveProgrammer | last post by:
Hi all I have made the following two structs and size is not according to what is supposed to be, so please ponder over following and identify if im wrong... please also mention what would be...
11
by: Sontu | last post by:
Consider the following code: int main(void) { char buffer; func(buffer); } void func(char *bufpas) {
4
by: Shayne H | last post by:
How can I create a structure that gets passed to an API call that will automatically set its size field? I tried the following: <StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Ansi)> _...
1
davydany
by: davydany | last post by:
Hey guys...a n00b Here for this site. I'm making a sequence class for my C++ class. And The thing is in the array that I have, lets say i put in {13,17,38,18}, when i see the current values for the...
1
by: shofu_au | last post by:
Hi Group, I am trying to define a class that has a fixed size array of a structure containing a fixed size array of a structure. I am using System.Runtime.InteropServices and trying to define...
76
by: jacob navia | last post by:
Since standard C doesn't provide any way for the programmer to direct the compiler as to how to layout structures, most compilers provide some way to do this, albeit in different forms. ...
9
Catalyst159
by: Catalyst159 | last post by:
I have a form which is used to calculate residential Floor Area Ratio (FAR). The form is structured into seven parts as follows: Part A: Maximum FAR and Floor Area: Part B: Gross Floor Area of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.