[openbeos] Re: Making BeOS accessible to Windows

  • From: "Manuel Jesus Petit de Gabriel" <freston@xxxxxxxxxxx>
  • To: <openbeos@xxxxxxxxxxxxx>
  • Date: Sat, 5 Jan 2002 23:42:35 -0800

> >[1] I am assuming that NTFS supports free-form attributes.
> 
> As far as i know - it doesnt.

It does.


> *But* something interesting about NTFS, is that you can have more than 
> one entry in the filesystem for the same filename. All you do is name 
> the second entry as filename:1 filename:2 (it may start at zero, but i 
> dont remember if zero if the actual original file)

Those are actually attributes. One nice thing about NTFS is that
you can read/write the attributes using the regular file IO function.
The default data stream (what you are calling "actual original file")
is an anonymous attribute of type Data (obviously there can be
only one anonymous Data attribute). When you do an

    open("filename:something", ...)

you are effectively creating a Data attribute named "something".

There are attribute types defined other than Data, NT ACLs
for instance are stored in attributes of type "Security Descriptor".

One limitation that, as far as i know, you cannot define new
attribute types.


> Windows wont report the additional "files" in the filesize of the file, 
> and they wont show up in explorer - you have to know they're there.

They don't show in explorer because, i insist, they are not files;
"filename:something" is an attribute of filename. As for the file
size, unfortunately only the size of the default Data stream is
displayed.


manuel,


> Maybe this would be a good way for a BeOS file system driver to store 
> the metadata/beos-attributes as its almost 100% invisible when you're 
> viewing the filesystem in windows?
> 
> Just an idea - but this is something ive only heard about - never 
> actually tried it myself.
> -jim


Other related posts: