This documentation is outdated and is to be rewritten under the new system specifications. Do not rely on this information.
The BIOS handles low-level disk and file management for storage.
The BIOS disk calls are run under the BIOS in the _bios-drives script.
Most programs should not use these commands. Refer to the SCOPE documentation for disk and file management calls used when operating in a SCOPE environment. These commands require disk UUIDs, not drive letters. SCOPE will automatically map drive letters to accessible disks and convert SCOPE disk calls into BIOS disk calls and vice versa.
Note that all path and file names are case-insensitive, though common convention is to have directory names in all uppercase and file names in all lowercase.
All paths must start with \ and must be a complete path. BIOS calls do not do any automatic relative path evaluation. For paths to directories, not files, you may include a trailing \, though it is optional.
Valid characters in filenames (except extensions) and disk labels are: 0123456789abcdefghijklmnopqrstuvwxyz!#$%&'()-@^_`{}~. Valid characters in extensions are: 0123456789abcdefghijklmnopqrstuvwxyz. Filenames with extensions must have a . to designate the extension, but the . character cannot be used in directories. Filenames with extensions must conform to the 8.3 filename convention but must have at least a 1-character extension.
| Input Message String | Integer | Key | LE-BIOS rev. | Script |
|---|---|---|---|---|
BIOS_DISK_CREATE_DIR |
[request_num] |
[disk_UUID]|[path] |
1000 | _bios-drives |
Creates a directory at [path] on the disk identified by [disk_UUID]. [path] must start with \. Will automatically create any parent directories as well. Returns BIOS_DISK_RSP_CREATE_DIR.
| Input Message String | Integer | Key | LE-BIOS rev. | Script |
|---|---|---|---|---|
BIOS_DISK_CREATE_FILE |
[request_num] |
[disk_UUID]|[path_name_ext]|[flag_auto_dir]|[flag_overwrite]|[content] |
1000 | _bios-drives |
Creates a file at the path, name, and extension [path_name_ext]. File name and extension must conform to the 8.3 standard. [path_name_ext] must start with \. For example, [path_name_ext] could be \DOCS\TEMP\file.txt. Returns BIOS_DISK_RSP_CREATE_FILE.
[flag_auto_dir] is a binary flag and must be 0 or 1. If 0, the file will not be created if the full path does not exist. If 1, the command will automatically create any missing parent directories.
[flag_overwrite] is a binary flag and must be 0 or 1. If 0, the file will not be created if it already exists. If 1, the file will be overwritten if it already exists.
[content] must be between 0 and 8192 characters and cannot contain the text "[[STUB]]" (without quotes), which is reserved for script stub files.
| Input Message String | Integer | Key | LE-BIOS rev. | Script |
|---|---|---|---|---|
BIOS_DISK_CREATE_STUB |
[request_num] |
(see BIOS_DISK_CREATE_FILE) |
1000 | _bios-drives |
Same as BIOS_DISK_CREATE_FILE, but allows the creation of files that contain the text "[[STUB]]" for script stub files. Returns BIOS_DISK_RSP_CREATE_FILE, not BIOS_DISK_RSP_CREATE_STUB.
| Input Message String | Integer | Key | LE-BIOS rev. | Script |
|---|---|---|---|---|
BIOS_DISK_DELETE_DIR |
[request_num] |
[disk_UUID]|[path]|[flag_recursive] |
1000 | _bios-drives |
Deletes the directory at [path] on the disk identified by [disk_UUID]. [path] must start with \. Returns BIOS_DISK_RSP_DELETE_DIR.
[flag_recursive] is a binary flag and must be 0 or 1. If 0, the directory must not contain any files or subdirectories. If 1, any files or subdirectories in the directory will also be deleted.
| Input Message String | Integer | Key | LE-BIOS rev. | Script |
|---|---|---|---|---|
BIOS_DISK_DELETE_FILE |
[request_num] |
[disk_UUID]|[path_name_ext] |
1000 | _bios-drives |
Deletes the file at the path, name, and extension [path_name_ext]. [path_name_ext] must start with \. For example, [path_name_ext] could be \DOCS\TEMP\file.txt. Returns BIOS_DISK_RSP_DELETE_FILE.
| Input Message String | Integer | Key | LE-BIOS rev. | Script |
|---|---|---|---|---|
BIOS_DISK_FORMAT |
[request_num] |
[disk_UUID]|[label] |
1000 | _bios-drives |
Formats the disk and erases all files and directories on it. Optionally, can also change the disk label (see BIOS_DISK_LABEL. Returns BIOS_DISK_RSP_FORMAT.
The [label] value is optional. If you do not wish to change the label, only provide [disk_UUID] as the key. Do not include the |.
Although it is possible to change the capacity of a disk, it requires a custom BIOS; the LE-BIOS installed on consumer Mark 1 computers will always format it using its current capacity.
| Input Message String | Integer | Key | LE-BIOS rev. | Script |
|---|---|---|---|---|
BIOS_DISK_INFO |
[request_num] |
[disk_UUID] |
1000 | _bios-drives |
Requests information about the disk. Returns BIOS_DISK_RSP_INFO.
| Input Message String | Integer | Key | LE-BIOS rev. | Script |
|---|---|---|---|---|
BIOS_DISK_LABEL |
[request_num] |
[disk_UUID]|[label] |
1000 | _bios-drives |
Sets the disk label. Returns BIOS_DISK_RSP_LABEL.
The label must be between 0 and 8 characters. It is case-insensitive and will always be returned in all lowercase.
| Input Message String | Integer | Key | LE-BIOS rev. | Script |
|---|---|---|---|---|
BIOS_DISK_MOVE_DIR |
[request_num] |
[source_disk_UUID]|[target_disk_UUID]|[source_path]|[target_path]|[flag_copy] |
1000 | _bios-drives |
Moves or copies a directory with its contents. Returns BIOS_DISK_RSP_MOVE_DIR.
This command takes two disk UUIDs - the source and target. They can be the same if you are only moving the directory on a single disk. If you are moving the directory from one disk to another, the disk UUIDs can be different, but both have to be accessible by the BIOS.
The directory at [source_path] will be moved into [target_path] and retain the same name. For example, if you have [source_path] as \DOCS\FILES\MOVEME and [target_path] as \NEWDOCS\FILES\MOVEME, you will end up with the original directory at \NEWDOCS\FILES\MOVEME\MOVEME. This is in contrast to BIOS_DISK_MOVE_FILE, which can include the new filename in the target.
[flag_copy] is a binary flag and must be 0 or 1. If 0, the directory will be moved (or cut), so it will no longer exist in the original parent directory. If 1, the directory will be copied, so it will leave a copy in the original parent directory.
This call cannot overwrite or merge a directory; the directory's name must be unused in [target_path].
| Input Message String | Integer | Key | LE-BIOS rev. | Script |
|---|---|---|---|---|
BIOS_DISK_MOVE_FILE |
[request_num] |
[source_disk_UUID]|[target_disk_UUID]|[source_path_name_ext]|[target_path_name_ext]|[flag_auto_dir]|[flag_copy] |
1000 | _bios-drives |
Moves or copies a file. Returns BIOS_DISK_RSP_MOVE_FILE.
This command takes two disk UUIDs - the source and target. They can be the same if you are only moving the file on a single disk. If you are moving the file from one disk to another, the disk UUIDs can be different, but both have to be accessible by the BIOS.
The file at [source_path_name_ext] will be moved or copied into [target_path_name_ext] if only a path to a directory is specified and will retain the same filename and extension. If, however, [target_path_name_ext] includes a filename and extension, the file will be named as specified in [target_path_name_ext]. This allows you to rename a file as you move or copy it.
[flag_auto_dir] is a binary flag and must be 0 or 1. If 0, the file will not be moved or copied if the full target path does not exist. If 1, the command will automatically create any missing parent directories.
[flag_copy] is a binary flag and must be 0 or 1. If 0, the file will be moved (or cut), so it will no longer exist in the original parent directory. If 1, the file will be copied, so it will leave a copy in the original parent directory.
| Input Message String | Integer | Key | LE-BIOS rev. | Script |
|---|---|---|---|---|
BIOS_DISK_READ_DIR |
[request_num] |
[disk_UUID]|[path]|[start_index]|[limit_num]|[output_format]|[dir_order]|[file_order]|[group_ext]|[dir_last] |
1000 | _bios-drives |
Lists contents of the directory at [path]]. Returns BIOS_DISK_RSP_READ_DIR.
[start_index] and [limit_num] will limit the response to a certain number of results to limit memory usage for directories with lots of files or subdirectories. [start_index] starts at 0. For example, if [start_index] is 20 and [limit_num] is 10, the BIOS will only return the 21st through 30th results, inclusive. This call should always be limited, because there is no hard limit on the number of files or subdirectories.
[output_format] must always be 1. In the future, other formats may be available.
[dir_order] must be either 0 (directories sorted A-Z) or 1 (directories sorted Z-A).
[file_order] must be either 0 (files sorted A-Z), 1 (files sorted Z-A), 2 (files sorted in ascending size, then A-Z for each size), or 3 (files sorted in descending size, then A-Z for each size).
[group_ext] must either be 0 (extensions not grouped), 1 (extensions grouped A-Z), or 2 (extensions grouped Z-A).
[dir_last] must be either 0 (directories, then files) or 1 (files, then directories).
| Input Message String | Integer | Key | LE-BIOS rev. | Script |
|---|---|---|---|---|
BIOS_DISK_READ_FILE |
[request_num] |
[disk_UUID]|[path_name_ext] |
1000 | _bios-drives |
Reads the file at [path_name_ext]. Returns BIOS_DISK_RSP_READ_FILE.
| Input Message String | Integer | Key | LE-BIOS rev. | Script |
|---|---|---|---|---|
BIOS_DISK_RENAME_DIR |
[request_num] |
[disk_UUID]|[path]|[name] |
1000 | _bios-drives |
Renames the directory at [path] to [name]. [name] cannot include a path; it must only be a directory name. Returns BIOS_DISK_RSP_RENAME_DIR.
| Input Message String | Integer | Key | LE-BIOS rev. | Script |
|---|---|---|---|---|
BIOS_DISK_RENAME_FILE |
[request_num] |
[disk_UUID]|[path_name_ext]|[name_ext]|[flag_ext_change] |
1000 | _bios-drives |
Renames the file at [path_name_ext] to [name_ext]. [name_ext] cannot include a path; it must only be a filename and extension. Returns BIOS_DISK_RSP_RENAME_FILE.
[flag_ext_change] is a binary flag and must be 0 or 1. If 0, the extension must remain the same. If 1, the extension can be changed. Note that this call will not validate any script stub file extensions.
| Input Message String | Integer | Key | LE-BIOS rev. | Script |
|---|---|---|---|---|
BIOS_DISK_RUN_FILE |
[request_num] |
[disk_UUID]|[path_name_ext] |
1000 | _bios-drives |
Runs the file at [path_name_ext] if it is a script stub file. Returns BIOS_DISK_RSP_RUN_FILE, although it will also run the file if it is a valid script stub file.
(to be documented)