[openbeos] Re: Incorrect File Sizes

  • From: "Raymond C. Rodgers" <obos@xxxxxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Fri, 06 Dec 2002 18:25:24 -0800

Actually, it is not a bug. It was an intentional design decision. That being said, there should be a simple, easily accessible method of accessing the total size of attributes, and it should be accessible through BNode. (BFile would then inherit it.) In my opinion, it should be a single function call. This function could essentially use what we developers already have at our disposal: BNode::GetNextAttrName(), BNode::GetAttrInfo(), a little bit of looping and do a little bit of basic math.

But of course, that's my opinion. If you want to call it a bug, go right ahead. I personally call it a missing feature. But as others have said, the length of the data inside the file is the correct theoretical file size. The attributes don't have any effect on what's inside the file, nor the contents of the file on the attributes. The attributes are there for an application's usage, not necessarily for the user.

Raymond
At 06:53 AM 12/4/2002, you wrote:
It makes sense that the file size doesn't include the size of the name of a
file or other meta data that the file system adds.  However, users add
attributes to files.  Attributes can become big.  Users are concerned about
disk space and how much they are using.  Users (me, for example) want to
know how much space their attributes use.  Be doesn't display that
information.  It doesn't do something a user wants.  Therefore it is a bug.


Scott MacMaster


----- Original Message -----
From: "Bruno G. Albuquerque" <bga@xxxxxxxxxxxxx>
To: <openbeos@xxxxxxxxxxxxx>
Sent: Wednesday, December 04, 2002 4:50 AM
Subject: [openbeos] Re: Incorrect File Sizes


> On Tue, 3 Dec 2002, Scott MacMaster wrote: > > > I just noticed that Be doesn't correctly calculate file sizes. I'm not sure > > of the details but I think the bug is probably in the BFS rather then > > tracker. I wonder if this has been dealt with in OpenBFS? > > > > The bug is simply, the size of attributes aren't added to the file size. > > It is not a bug. Attributes are metadata, not directly part of the file > data. For instance, no filesystem adds the size of the name o the file, > the permision bits and all other possible metadata to the size of the > file. > > -Bruno > > > >


--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.423 / Virus Database: 238 - Release Date: 11/25/2002



Other related posts: