Contents     Previous: Filetypes     Next: Index

Attributes are data fields that belong to a file but aren't part of that file, e.g. they are not computed into the file size and can be copied or changed without touching the file itself. The system uses these attributes to store e.g. file size, file type or date of the last modification. This is similar to other operating systems and their filesystems.

What's different is that you can add any kind of attribute to any file and display it or make it editable in a Tracker window. You just have to define the kind of attribute you want to add to a file type (e.g. string, integer or time) and give it a name and description.

The file itself doesn't even need any contents at all. Take a look at these People files for example:

people.png

As you can see, these are all 0-sized files with attached attributes, the E-mail attribute of "John Nox" being edited right in Tracker.

If you index these attributes, as People, Email or audio files are by default, they are also searchable with Haiku's fast query system.

Attributes in Tracker

Attributes are displayed quite similar to a database or spreadsheet. Using Tracker you can choose which attributes to display (columns) and sort file listings (rows) accordingly.

To do this, open a Tracker window, click on the Attributes menu, and select the attributes you want to display. Alternatively, simply right-click onto a column heading and mark the items in the context menu. You can rearrange the columns by a simple drag&drop of the column heading. Moving a column out of a window, is a fast way to get rid of columns you don't need.

Double-click on the line between two attributes in the heading to automatically resize a column to its optimal width.

Click on a column heading to toggle the sorting order from ascending to descending. You can establish a secondary sort order by pressing the SHIFT key while clicking on a column heading. Doing that you can, for example, sort your People files by company and within that order sort by contact name. See the above screenshot as an example. The secondary sort order is marked by a dotted line under the heading.

Editing these attributes is as simple as renaming a file: Either click on an entry or press ALT E and move between the attributes with TAB and SHIFT TAB. ESC leaves the editing mode without applying the changes.

Attributes in Terminal

If you prefer to use the commandline or plan to work with many files using scripting, there are several commands for controlling attributes from Terminal:






More information on these commands and their options can be found by typing the command name followed by "-h" or "--help".

Contents     Previous: Filetypes     Next: Index