I’ve created a simple no-compression archive format similar to TAR, and I’m in the process of implementing support for arbitrary file attributes. I want to make sure that my format will preserve all BFS information.
Does anyone know of where I can find some specifics about BFS attributes? I found a little bit in Practical File System Design, but not enough to fulfill my requirements.
I’ve never programmed for the BeOS before, so forgive me if some of my questions are stupid; I’m doing this in ANSI C and once I work out the kinks in the format, I’ll implement it for BeOS (which is the intended end result) in C++. Anyway, here are some of the less technical questions I need answered:
Is there a universal set of required attributes that all files have (i.e. modified time, date created, etc.)? If so, what are they?
Can directories have attributes?
Are symbolic links considered files by the BFS?
Are MIME types stored as file attributes or are they stored elsewhere?
Any resources (or answers) whatsoever would be greatly appreciated!
Hi,
I am not on BeOS at the moment so here only some thoughts that I have in my mind:
>Is there a universal set of required attributes that all files have (i.e. >modified time, date created, etc.)? If so, what are they?
in the terminal copy a file from a no bfs partion to the bfs then make an listattr on this file you will see the basic attributes
then use in the tracker the fileinfo addon on this file. Now you will see the the new attribute BEOS:TYPE there is stored the mime type…
>Can directories have attributes?
may be the trick above?
>Are symbolic links considered files by the BFS?
I think so…
>Are MIME types stored as file attributes or are they stored elsewhere?
yes in BEOS:TYPE
In the terminal this tools are helpfull: listattr, getattr, addattr, and rmattr
for index: lsindex, mkindex…
Yes, I’m subscribed to the list. But I didn’t want to disturb them with trivial things like this unless I have to. (BTW, they’re having a brainstorming session with regards to the new netstack. Very exciting stuff!)
umccullough wrote:
j_freeman wrote:
I've created a simple no-compression archive format similar to TAR...
HAR?
Are you suggesting the name be called that? (As in Haiku ARchive?) I considered it, but there seems to be a format by that name already.
ZzLeCzZ wrote:
Hi,
I am not on BeOS at the moment so here only some thoughts that I have in my mind:
>Is there a universal set of required attributes that all files have (i.e. >modified time, date created, etc.)? If so, what are they?
in the terminal copy a file from a no bfs partion to the bfs then make an listattr on this file you will see the basic attributes
then use in the tracker the fileinfo addon on this file. Now you will see the the new attribute BEOS:TYPE there is stored the mime type…
>Can directories have attributes?
may be the trick above?
>Are symbolic links considered files by the BFS?
I think so…
>Are MIME types stored as file attributes or are they stored elsewhere?
yes in BEOS:TYPE
In the terminal this tools are helpfull: listattr, getattr, addattr, and rmattr
for index: lsindex, mkindex…
Thanks! I’ll try these tools out tonight.
One question about the BEOS:TYPE attribute; the key is "BEOS:TYPE", I assume? The type must be a string then?
Thanks, I forgot about that one. And you’re right about directories: "Every fileââ¬âwhether it’s a document, an application, or even a directory has its own file type attribute."
I guess that includes symbolic links? I might contact BGA or Axel this weekend to get some more details.