Filing Systems



Path variables

The handling of path variables by FileSwitch has changed slightly from that documented by the PRMs. Primarily this is in order to align use with that of the regular filing systems.

Path variables can now (as of FileSwitch 2.51) use a '$' specifier at their root, for example 'Choices:$'. This will be treated as being the top most level of the path variable. The use of un-specified path components in the use of path variables is thus discouraged. This change ensures that applications which attempt to process paths can do so in a consistent manner without requiring special cases. Previously it would have been necessary to check whether a path name terminates in a ':' character before appending a period and leaf name (that is 'Choices:' cannot have a regular '.Leaf' appended to it to create a valid filename). Similarly, the use of un-specified path components on true filing systems (eg 'ADFS:') is discouraged.

The objects referred to in a path variables cannot, generally, be written to where they do not already exist. The exception to this is a path variable with only a single entry. However, since path variables are explicitly expected to be extended (otherwise a regular system variable with a '$Dir' suffix would have been used), reliance on this behaviour is strongly discouraged. From FileSwitch 2.56 onward, however, write operations on a path variable will check the '$Write' variant of the variable for a valid directory name. That is, the '$Path' suffix will be replaced by '$Write'. This should be a variable containing the directory name to which write operations to non-existent objects should be performed for this path variable. This does not make the use of path variables completely transparent, as (for example) enumeration operations are not applied to all members of the variable, but it does alleviate some issues with their use.

This documentation is copyright 3QD Developments Ltd 2013 and may not be reproduced or published in any form without the copyright holders permission. RISC OS is subject to continuous development and improvement as such all information is reproduced by 3QD Developments Ltd in good faith and is believed to be correct at the time of publication E&OE. 3QD Developments Ltd cannot accept any liability for any loss or damage arising from the use of any information provided as part of the RISC OS Documentation.

HTML document version 1.03 3rd November 2015