Performs an LDFS filesystem operation on the local linkset.
Response: After the LDFS driver has processed the system call and completed the operation, it will respond with BIOS_DISK_LDFS_RESP.
llMessageLinked(LINK_ROOT, [ident], "BIOS_DISK_LDFS_OP", [operation]);
| • target | LINK_ROOT |
| • integer | [ident] |
| • key | [operation] |
| Parameter | Description |
|---|---|
[ident] |
Integer. Any integer. Will be returned with BIOS_DISK_LDFS_RESP. Can be used to identify specific calls to the LDFS driver, or can be left as 0 if not needed. |
[operation] |
Pipe-delimited ("|") list cast as string. Must be the operation to perform on the LDFS disk. The format of this parameter varies depending on the command used. See below for more information. |
The [operation] parameter is a pipe-delimited ("|") list. The general format is "[command]|[subparameters...]". Possible commands are as follows:
| Command | Format |
|---|---|
| "AD" (Read Directory Attributes) | "AD|" + [request_id] + "|" + [path] |
| "AF" (Read File Attributes) | "AF|" + [request_id] + "|" + [path/file.ext] |
| "DD" (Delete Directory) | "DD|" + [request_id] + "|" + [path] |
| "DF" (Delete File) | "DF|" + [request_id] + "|" + [path/file.ext] |
| "FF" (Format) | "FF|" + [request_id] |
| "II" (Get Disk Info) | "II|" + [request_id] |
| "LL" (Write Disk Label) | "LL|" + [request_id] + "|" + [disk_label] |
| "MD" (Move Directory) | "MD|" + [request_id] + "|" + [original_path] + "|" + [new_parent_path] + "|" + [new_device] + "|" + [copy] + "|" + [overwrite] + "|" + [force] |
| "MF" (Move File) | "MF|" + [request_id] + "|" + [original_path/file.ext] + "|" + [new_parent_path OR new_parent_path/file.ext] + "|" + [new_device] + "|" + [copy] + "|" + [overwrite] + "|" + [force] |
| "RD" (Read Directory) | "RD|" + [request_id] + "|" + [path] + "|" + [memory_bank] + "|" + [memory_user] + "|" + [erase_memory] + "|" + [filter_type] + "|" + [include_hidden] |
| "RF" (Read File) | "RF|" + [request_id] + "|" + [path/file.ext] + "|" + [memory_bank] + "|" + [memory_user] + "|" + [insert] + "|" + [index] |
| "RS" (Read Stub/Symlink) | "RS|" + [request_id] + "|" + [path OR path/file.ext] |
| "SF" (Read File Size) | "SF|" + [request_id] + "|" + [path/file.ext] |
| "WA" (Write File Attributes) | "WA|" + [request_id] + "|" + [path/file.ext] + "|" + [attributes] |
| "WD" (Write Directory) | "WD|" + [request_id] + "|" + [path] + "|" + [attributes] + "|" + [overwrite] |
| "WF" (Write File) | "WF|" + [request_id] + "|" + [path/file.ext] + "|" + [attributes] + "|" + [overwrite] + "|" + [memory_bank] + "|" + [memory_user] + "|" + [append] + "|" + [data] |
| "WS" (Write Stub/Symlink) | "WS|" + [request_id] + "|" + [path OR path/file.ext] + "|" + [attributes] + "|" + [overwrite] + "|" + [data] |
| "XX" (Execute) | "XX|" + [request_id] + "|" + [path/file.ext] + "|" + [interrupt_ident] + "|" + [launch_parameters] |
For all operations, the following subparameter is required:
| Subparameter | Description |
|---|---|
[request_id] |
String. Must be a string, up to 64 characters, that will be returned with BIOS_DISK_LDFS_RESP. Can be any value, or left blank. Does not need to be unique. |
For many operations, one of the following subparameters are required:
| Subparameter | Description |
|---|---|
[path] |
String. Must be a string that defines a path to a directory. The LDFS driver always assumes absolute paths from the current linkset; therefore, this parameter must not include a disk letter. Paths to directories should be passed to this system call as "/PARENT/TARGET". Elements of the path must be separated by either "/" (forward slash), "\" (backslash), or a combination of either. The filesystem canonically uses forward slashes. The leading slash may be omitted; it will be assumed by the LDFS driver. If a trailing slash is included, it will be ignored. Directory and file names are not case-sensitive. The filesystem canonically treats directories as uppercase and files as lowercase. Directory names may be between 1 and 8 characters and may only contain the following characters: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ !#$%&'()-@^_`{}~" To specify the root directory, use "/". |
[path/file.ext] |
String. Must be a string that defines a path to a file. The LDFS driver always assumes absolute paths from the current linkset; therefore, this parameter must not include a disk letter. Paths to files should be passed to this system call as "/PARENT/target.txt". File names may be between 1 and 8 characters, followed by a "." (period), followed by between 1 and 3 characters, and aside from the single period may only contain the following characters: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ !#$%&'()-@^_`{}~" All other rules from [path] also apply to [path/file.ext]. |
An "AD" (Read Directory Attributes) operation reads the attributes of the specified directory and returns them in BIOS_DISK_LDFS_RESP.
llMessageLinked(LINK_ROOT, [ident], "BIOS_DISK_LDFS_OP", "AD|" + [request_id] + "|" + [path]);
For more information on LDFS filesystem attributes, see the LDFS documentation.
An "AF" (Read File Attributes) operation reads the attributes of the specified file and returns them in BIOS_DISK_LDFS_RESP.
llMessageLinked(LINK_ROOT, [ident], "BIOS_DISK_LDFS_OP", "AF|" + [request_id] + "|" + [path/file.ext]);
For more information on LDFS filesystem attributes, see the LDFS documentation.
A "DD" (Delete Directory) operation deletes the specified directory.
llMessageLinked(LINK_ROOT, [ident], "BIOS_DISK_LDFS_OP", "DD|" + [request_id] + "|" + [path]);
The directory must be empty.
If [path] points to a symlink, only the symlink will be deleted, not its target. If [path] points to the target of a symlink, the target will be deleted and the symlink will become orphaned.
A "DF" (Delete File) operation deletes the specified file.
llMessageLinked(LINK_ROOT, [ident], "BIOS_DISK_LDFS_OP", "DF|" + [request_id] + "|" + [path/file.ext]);
If [path/file.ext] points to an executable stub file, the underlying LSL script will also be deleted and cannot be recovered. For more information, see BIOS_SCI_DELETE.
If [path/file.ext] points to a symlink, only the symlink will be deleted, not its target. If [path/file.ext] points to the target of a symlink, the target will be deleted and the symlink will become orphaned.
An "FF" (Format) operation deletes all directories and files on the local disk, then recreates the root directory.
llMessageLinked(LINK_ROOT, [ident], "BIOS_DISK_LDFS_OP", "FF|" + [request_id]);
This will delete all data and reset the LDFS to its out-of-the-box state. This will also delete all installed software, including any operating system such as SCOPE. This command should generally only be used on external/removable storage media for obvious reasons.
An "II" (Get Disk Info) operation returns general LDFS filesystem data in BIOS_DISK_LDFS_RESP.
llMessageLinked(LINK_ROOT, [ident], "BIOS_DISK_LDFS_OP", "II|" + [request_id]);
An "LL" (Write Disk Label) operation writes the disk label for the local LDFS filesystem.
llMessageLinked(LINK_ROOT, [ident], "BIOS_DISK_LDFS_OP", "LL|" + [request_id] + "|" + [disk_label]);
| Subparameter | Description |
|---|---|
[disk_label] |
String. Must be between 1 and 11 characters and may only contain the following characters: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ !#$%&'()-@^_`{}~" |
An "MD" (Move Directory) operation moves or copies the specified directory into another directory.
Not currently implemented.
llMessageLinked(LINK_ROOT, [ident], "BIOS_DISK_LDFS_OP", "MD|" + [request_id] + "|" + [original_path] + "|" + [new_parent_path] + "|" + [new_device] + "|" + [copy] + "|" + [overwrite] + "|" + [force]);
| Subparameter | Description |
|---|---|
[original_path] |
String. A [path] parameter pointing to the directory to be moved. |
[new_parent_path] |
String. A [path] parameter pointing to the directory to move the [original_path] directory into; in other words, its new parent directory. |
[new_device] |
String. Either a blank string or the prim UUID in which another LDFS driver is located in the same Second Life region. This is used to move data between separate devices, such as the system unit and floppy disks. |
[copy] |
Boolean cast as string. Either 0 or 1. A flag to leave a copy of the directory at the original location. |
[overwrite] |
Boolean cast as string. Either 0 or 1. A flag to overwrite an existing directory if it already exists. |
[force] |
Boolean cast as string. Either 0 or 1. An integer flag to force moving read-only files if any are detected in the directory. If any read-only files are encountered and this flag is not enabled, the operation will fail. |
If [path] contains any executable stub files, the [copy] flag must not be set. If it is, the operation will fail, because stub files cannot be copied.
If [path] points to a symlink, only the symlink will be moved, not its target. If [path] points to the target of a symlink, the target will be moved and the symlink will become orphaned if the [copy] flag is not set.
An "MF" (Move File) operation moves or copies the specified file.
llMessageLinked(LINK_ROOT, [ident], "BIOS_DISK_LDFS_OP", "MF|" + [request_id] + "|" + [original_path/file.ext] + "|" + [new_parent_path OR new_parent_path/file.ext] + "|" + [new_device] + "|" + [copy] + "|" + [overwrite] + "|" + [force]);
| Subparameter | Description |
|---|---|
[original_path/file.ext] |
String. A [path/file.ext] parameter pointing to the file to be moved. |
[new_parent_path OR new_parent_path/file.ext] |
String. One of the following: • A [path] parameter pointing to the directory to move the file into; in other words, its new parent directory.• A [path/file.ext] parameter pointing to a specific file location to move the file to; in other words, its new parent directory, followed by its new name.This allows the operation to rename the file at its new location, particularly useful for copying a file into the same directory. |
[new_device] |
String. Either a blank string or the prim UUID in which another LDFS driver is located in the same Second Life region. This is used to move data between separate devices, such as the system unit and floppy disks. |
[copy] |
Boolean cast as string. Either 0 or 1. A flag to leave a copy of the file at the original location. |
[overwrite] |
Boolean cast as string. Either 0 or 1. A flag to overwrite an existing file if it already exists. |
[force] |
Boolean cast as string. Either 0 or 1. An integer flag to force moving read-only file. If the specified file is read-only and this flag is not enabled, the operation will fail. |
If [path/file.ext] points to an executable stub file, the [copy] flag must not be set. If it is, the operation will fail, because stub files cannot be copied.
If [path/file.ext] points to a symlink, only the symlink will be deleted, not its target. If [path/file.ext] points to the target of a symlink, the target will be deleted and the symlink will become orphaned.
An "RD" (Read Directory) operation reads a list of subdirectories or files in the specified directory into a RAM memory bank.
llMessageLinked(LINK_ROOT, [ident], "BIOS_DISK_LDFS_OP", "RD|" + [request_id] + "|" + [path] + "|" + [memory_bank] + "|" + [memory_user] + "|" + [erase_memory] + "|" + [filter_type] + "|" + [include_hidden]);
| Subparameter | Description |
|---|---|
[memory_bank] |
Integer cast as string. Must be a RAM memory bank number. The list of subdirectories or files will be loaded into this memory bank. Software must first allocate a memory bank using BIOS_RAM_ALLOCATE. |
[memory_user] |
String. Must be the [user] that was sent with BIOS_RAM_ALLOCATE to allocate the memory bank specified by [memory_bank]. |
[erase_memory] |
Boolean cast as string. Must be either 0 or 1. A flag to erase the specified memory bank before writing the listing to it. If this flag is not enabled, the LDFS driver will append the directory listing onto the end of any existing data. This can be used when calling the command multiple times sequentially to obtain a combined list of subdirectories and files. This command cannot insert results to a specific index in memory. |
[filter_type] |
Integer cast as string. Must be either 0 or 1. May be one of the following values: • 0: Returns subdirectories only. • 1: Returns files only. |
[include_hidden] |
Integer cast as string. Must be either 0, 1, or 2. May be one of the following values: • 0: Returns non-hidden subdirectories/files only. • 1: Returns hidden subdirectories/files only. • 2: Returns all results regardless of whether they are marked as hidden. |
If [path] points to a symlink, this operation will return a list of subdirectories or files in the target of the symlink. To read the contents of the symlink directory entry itself (to get its target path), use an "RS" (Read Stub/Symlink) operation.
The format of the list stored to RAM will vary depending on which [filter_type] is used. See BIOS_DISK_LDFS_RESP for details on the format of the data in RAM.
An "RF" (Read File) operation reads the contents of the specified file into a RAM memory bank.
llMessageLinked(LINK_ROOT, [ident], "BIOS_DISK_LDFS_OP", "RF|" + [request_id] + "|" + [path/file.ext] + "|" + [memory_bank] + "|" + [memory_user] + "|" + [insert] + "|" + [index]);
| Subparameter | Description |
|---|---|
[memory_bank] |
Integer cast as string. Must be a RAM memory bank number. The file contents will be loaded into this memory bank. Software must first allocate a memory bank using BIOS_RAM_ALLOCATE. |
[memory_user] |
String. Must be the [user] that was sent with BIOS_RAM_ALLOCATE to allocate the memory bank specified by [memory_bank]. |
[insert] |
Boolean cast as string. Must be either 0 or 1. A flag that causes the LDFS driver to use an "I" (Insert) RAM operation. If this flag is not set, the LDFS driver will use a "W" (Write) RAM operation, which will overwrite any existing data in the memory bank. |
[index] |
Integer cast as string. Any integer. The [index] parameter to pass in the "I" (Insert) RAM operation if the [insert] flag is set.If the [insert] flag is not set, this subparameter is ignored. |
If [path/file.ext] points to a symlink, this operation will read the contents of the target of the symlink. To read the contents of the symlink file entry itself (to get its target file), use an "RS" (Read Stub/Symlink) operation.
An "RS" (Read Stub/Symlink) operation reads the contents of the specified executable stub file or symlink filesystem entry and returns it in BIOS_DISK_LDFS_RESP.
llMessageLinked(LINK_ROOT, [ident], "BIOS_DISK_LDFS_OP", "RS|" + [request_id] + "|" + [path OR path/file.ext]);
| Subparameter | Description |
|---|---|
[path OR path/file.ext] |
String. One of the following: • A [path] parameter.• A [path/file.ext] parameter.This operation accepts both directories and files. |
A "WA" (Write File Attributes) operation modifies the attributes of a file.
llMessageLinked(LINK_ROOT, [ident], "BIOS_DISK_LDFS_OP", "WA|" + [request_id] + "|" + [path/file.ext] + "|" + [attributes]);
| Subparameter | Description |
|---|---|
[attributes] |
Integer cast as string. An integer representing an LDFS attribute bitfield. For more information on LDFS filesystem attributes, see the LDFS documentation. |
This operation can only modify file attributes. To modify directory attributes, use an "WD" (Write Directory) operation with the [overwrite] flag set.
If [path/file.ext] points to a symlink, this operation will write the attributes of the symlink, not its target.
A "WD" (Write Directory) operation creates or modifies the attributes of the specified directory.
llMessageLinked(LINK_ROOT, [ident], "BIOS_DISK_LDFS_OP", "WD|" + [request_id] + "|" + [path] + "|" + [attributes] + "|" + [overwrite]);
| Subparameter | Description |
|---|---|
[attributes] |
Blank string or integer cast as string. Must be either a blank string or an integer representing an LDFS attribute bitfield. In most cases, this should be set a. Bits 1 (stub), 2 (read-only), 8 (symlink), and 16 (4096-byte size) of the bitfield will be ignored. For more information on LDFS filesystem attributes, see the LDFS documentation. |
[overwrite] |
Boolean cast as string. Must be either 0 or 1. A flag to overwrite an existing directory if it already exists. This will not affect any files within the existing directory; it will only overwrite the directory attributes. |
If [path/file.ext] points to a symlink, this operation will write the attributes of the symlink, not its target.
A "WF" (Write File) operation creates, overwrites, or appends data to a file.
llMessageLinked(LINK_ROOT, [ident], "BIOS_DISK_LDFS_OP", "WF|" + [request_id] + "|" + [path/file.ext] + "|" + [attributes] + "|" + [overwrite] + "|" + [memory_bank] + "|" + [memory_user] + "|" + [append] + "|" + [data]);
| Subparameter | Description |
|---|---|
[attributes] |
Blank string or integer cast as string. Must be either a blank string, or an integer representing an LDFS attribute bitfield. If a blank string, any existing file's attributes will be used. If the file does not exist, the attributes will all be set to 0. In most cases, this should be set as a blank string. Bits 1 (stub), 8 (symlink), and 16 (4096-byte size) of the bitfield will be ignored. For more information on LDFS filesystem attributes, see the LDFS documentation. |
[overwrite] |
Boolean cast as string. Must be either 0 or 1. A flag to overwrite the existing file if it already exists. If the [append] flag is enabled, this subparameter is ignored and the [overwrite] flag is also enabled automatically. |
[memory_bank] |
Integer cast as string. Must be either 0 or a RAM memory bank number. If 0, the file contents must be supplied in the [data] subparameter; RAM will not be used.If not 0, the file contents will be read from this memory bank. Software must first allocate a memory bank using BIOS_RAM_ALLOCATE. |
[memory_user] |
String. Must be the [user] that was sent with BIOS_RAM_ALLOCATE to allocate the memory bank specified by [memory_bank].If [memory_bank] is 0, this subparameter is ignored. |
[append] |
Boolean cast as string. Must be either 0 or 1. A flag to append new data onto the end of an existing file, if it exists. If 0, any existing data will be overwritten, unless the [overwrite] flag is not set, in which case the operation will fail if a file exists. |
[data] |
String. Must be a string of data up to 128 characters to write as the file contents. If [memory_bank] is not 0, this subparameter is ignored.Must be specified as a blank string even if writing from RAM; if the final pipe ("|") character is missing, the operation will fail. |
To write an executable stub file or symlink, use a "WS" (Write Stub/Symlink) operation.
A "WS" (Write Stub/Symlink) operation creates or overwrites an executable stub file or symlink.
This operation writes tne contents of the symlink directory or stub/symlink file's filesystem entry.
llMessageLinked(LINK_ROOT, [ident], "BIOS_DISK_LDFS_OP", "WS|" + [request_id] + "|" + [path OR path/file.ext] + "|" + [attributes] + "|" + [overwrite] + "|" + [data]);
| Subparameter | Description |
|---|---|
[path OR path/file.ext] |
String. One of the following: • A [path] parameter.• A [path/file.ext] parameter.This operation accepts both directories and files. |
[attributes] |
Blank string or integer cast as string. Must be either a blank string, or an integer representing an LDFS attribute bitfield. If a blank string, any existing directory or file's attributes will be used. If a [path] is specified, bits 1 (stub), 2 (read-only), and 16 (4096-byte size) are ignored, and bit 8 (symlink) must be set.If a [path/file.ext] is specified, bit 16 (4096-byte size) is ignored, and either bit 1 (stub) or bit 8 (symlink) must be set.If the directory or file entry does not already exist, [attributes] must be provided to specify whether the entry is a stub or symlink.If the directory or file entry already exists, the provided [attributes] must match for bits 1 (stub) and 8 (symlink); normal files cannot be converted into stubs/symlinks and vice versa.For more information on LDFS filesystem attributes, see the LDFS documentation. |
[overwrite] |
Boolean cast as string. Must be either 0 or 1. A flag to overwrite the existing directory or file entry if it already exists. |
[data] |
String. Must be a string of data up to 128 characters to write as the executable stub file's LSL script name or the symlink's target. |
An "XX" (Execute) operation executes an executable stub file using BIOS_SCI_EXECUTE or, if the [interrupt_ident] subparameter is set, BIOS_SCI_INTERRUPT_REQUEST.
llMessageLinked(LINK_ROOT, [ident], "BIOS_DISK_LDFS_OP", "XX|" + [request_id] + "|" + [path/file.ext] + "|" + [parent_script_name] + "|" + [interrupt_ident] + "|" + [launch_parameters]);
| Subparameter | Description |
|---|---|
[parent_script_name] |
String. If the file is a library, may be the name of an LSL script that is currently loaded as a service in the SCI service stack. If this field specifies a valid service and you are excuting a library, the library will be associated with the specified service. If this field does not specify a valid service or is left blank and you are executing a library, the library will be associated with the current running program. If you are executing a program or service, this subparameter is ignored and may be left blank. |
[interrupt_ident] |
Integer cast as string. Must be either 0 or an [ident] to send with BIOS_SCI_INTERRUPT_REQUEST.If this value is 0 or [path/file.ext] is not a program, the executable stub file will be launched immediately using BIOS_SCI_EXECUTE instead.If this value is non-zero and [path/file.ext] is a program, the SCI will attempt to launch it by sending BIOS_SCI_INTERRUPTED to the current running program. If the current running program responds with BIOS_SCI_INTERRUPT_ALLOW, the program will be launched. |
[launch_parameters] |
String. Must be a string up to 256 characters. Arbitrary launch parameters that will be passed to the newly executed script with BIOS_SCI_STARTED. |