[openbeos] Re: Storage Kit

  • From: Duncan Wilcox <duncan@xxxxxxxxx>
  • To: <openbeos@xxxxxxxxxxxxx>
  • Date: Sun, 04 Nov 2001 11:27:15 +0100

> In the replacement api there is no concept of
> attributes, but if/when I get around to implementing it, it will be
> similar to the Be way, which involves having a readattr/writeattr/etc
> call. I am still keeping the concept of stream types though, and will
> probably implement openattrdir/readattrdir/etc by opening a file with a
> STREAM_TYPE_ATTRDIR type or something like that.

Hi Travis,

readattr/writeattr are a breeze compared to OS/2's extended attribute API,
but they're still unnecessairly clumsy compared to the standard file access

I don't know what kind of problems might arise, but what about turning files
with attributes into directories?

The directory might be flagged in a way that it appears to be a plain file,
attribute streams would be simple file streams, with plain file descriptors
to access them.

Enumerating attributes would work like enumerating files in a directory.

Some magic would be needed somewhere to map usual file operations (open,
stats) to the main file's stream.

What's lost is the space optimization that BFS does of placing small
attributes directly in the file's inode. Maybe that optimization can be
generalized to any small file hanging off a directory.

BTW, should OpenBeOS' binary compatibility goal also apply to the file
system layout?


Other related posts: