本节的翻译还未完成。在未完成之前,所有的未完成部分都将使用英语原文。

文件系统布局

Haiku 的文件系统布局是非常清晰,尽量使用简单的名字为文件和文件夹命名,让用户不会产生疑问。对于维持系统的正常运行非常重要的文件和文件夹是受到保护的,当它们发生意外的更改时,系统将会弹出以下警告:

achtung-user.png  achtung-system.png

如果您重命名或者删除了系统级别的内容,那么系统将会弹出第二类警告。在此菜单上,“Rename” 按钮只有在您按下 SHIFT 键时才能够点击。

Generally, there are two separate branches springing from the root folder of the boot volume:

/boot/system/ Contains system files and applications/packages shared by all users.
/boot/home/ This is your personal folder where you keep your data and settings and the applications/packages that are not shared by all users.

As long as Haiku isn't multi-user, this distinction between shared and not-shared applications/packages has no apparent effect, as there's only one user with one home folder. But since there will be support for more users than one eventually, it makes sense to learn the right way from the start.

index 系统文件夹 - /boot/system/

Under Haiku's predecessor BeOS, this folder was named /boot/beos/. You may still find it in some older documentation (e.g. in the original BeBook).
Most of the folders inside /boot/system/ are read-only, which is sensible as they contain the files necessary for Haiku to function correctly and therefore have to be safe from (accidental) alteration. The only user-writable folders are:

/boot/system/cache/ Contains cached files and the temporary folder linked to /tmp/.
/boot/system/non-packaged/ Contains a hierarchy for files that aren't part of a .hpkg (probably from old BeOS archives).
/boot/system/packages/ Besides holding Haiku's system packages, you can add/remove packages shared by all users.
/boot/system/settings/ Contains system-wide settings.
/boot/system/var/ Contains logs like the syslog (important when troubleshooting) and is the default location for the swap file.

For more information on the packages and non-packaged folders, see topic Installing applications.

index home文件夹 - /boot/home/

This folder belongs to you. Here you can create and delete files and folders as you wish. (By the way, the tilde ("~") is a shortcut for your home folder, so you don't always have to write "/boot/home/" in Terminal.)
Files that you'd like to share with other users in a future multi-user environment have do be put outside /boot/home/. For example, you could create a folder /boot/all-users/ and put the stuff there.

~/Desktop/  Holds the files of your desktop. Double-clicking won't open it, as it is already always visible. When your files happen to be obscured by open windows, just switch quickly to another Workspace. Of course, drilling down by right-clicking is also possible.
~/mail/  This is the default location for your mails.
~/people/  This is the default location for you contact files, see People.
~/queries/  Queries are stored here, by default temporarily for 7 days.

The folder /boot/home/config/ is special: just like /boot/system/ it's mostly under the control of the package management and therefore read-only. It too contains these similar user-writable folders:

~/config/packages/  Here you can add/remove packages that are not shared by all users.
~/config/non-packaged/  Contains a hierarchy for files that aren't part of a .hpkg (probably from old BeOS archives) and are not shared by all users.
~/config/settings/  该文件夹存放了所有程序的设置文件和一些系统配置文件。有些程序会将其设置文件存放在它们自己的子文件夹中,但是其他的则直接存放在这里。

For more information on the packages and non-packaged folders, see topic Installing applications.

Here are some of the more interesting subfolders in ~/config/settings:

boot/  该文件夹存放了在系统启动或者关闭时所运行的用户脚本
boot/launch/  该文件夹中的程序快捷方式,或者文档在每次启动时都自动开始运行。
beos_mime/  在这个MIME 数据库中, Haiku跟踪保持了所有的 文件类型 和它们的设置情况。
deskbar/menu/  Copied or linked to files/folders/queries in this folder appear in the Deskbar menu.
kernel/drivers/  有一个设置文件可能比较有趣: kernel 提供了一些底层的配置,例如,禁用 SMP,激活串行调试或者 允许高级电源管理。您只要将该配置行前的 “#” 注解符号删除即可。在操作时,要时刻小心!
Tracker/  除了用于 Tracker 的各种设置文件外,还有一些有趣的子文件夹:
DefaultFolderTemplate/显示和编排所有的属性与您喜欢的窗口大小。每个新建的文件夹都将以它为模板。
DefaultQueryTemplates/您可以为确定的文件类型定义查询结果的窗口布局。可以参阅 查询:结果窗口 主题。
Go/把您最喜欢的路径的链接放置在这里,可以打开或者保存面板中对他们进行访问。可以参阅 Haiku's GUI: Favorites and recent folders 主题。
Tracker New Template/为任意的文件类型添加模板,它们就可以在Tracker的 File | New... 菜单中进行访问。 可以参阅Tracker:文件处理主题。