File System
§1 Paths
Ashet OS utilizes UNIX-like file paths in combination with a DOS-style drive identifier. For example, SYS:wiki/ashet/filesystem.hdoc would be the path of this file.
Paths start with an uppercase drive name separated by : from the first folder name. Folders are separated by /. The last element of the path is either a file or a directory name. All previous elements must be folder names.
There are some restrictions on path formatting:
-
A path must not be empty.
-
A path must be encoded in valid UTF-8.
-
A file or folder name must not be longer than 120 characters.
-
A file or folder name must not contain any ASCII control characters.
-
A file or folder name must not contain a backslash character, to prevent confusion with Windows or DOS paths.
-
There must be no leading
/before the first folder. -
There must be no double
//in any component.
§2 Filesystem Hierarchy
SYS:/
|- apps/
| |- init.ashex
| |- ...
| '- ${app_name}.ashex
|- system/
| |- os.cfg
| |- fonts/
| | |- mono-6.font
| | |- mono-8.font
| | |- sans-6.font
| | |- sans.font
| | '- ...
| |- icons/
| | '- ...
| '- ...
|- etc/
| |- desktop/
| | '- wallpaper.abm
| '- readme
|- wiki/
| |- index.hdoc
| '- ...
'- docs/
'- filesystem.txt
SYS:/apps/<app_name>.ashex is an Ashet executable file that will be loaded at a relocatable address in memory. It contains code, icon data, and embedded files of the application.
extern struct {
bitmap: [32 * 32]u8,
palette: [15]u16,
}
Color values are either 0 for transparent or 1...15 for the colors.