RISC OS like other Operating Systems has the ability to access information stored on storage devices such as Hard Discs, Optical Media, Ram Discs and USB devices and Networked devices.
As standard, RISC OS comes with several filing systems:
Name | Description |
---|---|
ADFS | Primary filing system for accessing both hard discs and floppy disc drives |
NetFS | Used to control access to Econet (networked) file servers |
RamFS | Accessing an area of memory as if it is a disc |
NetPrint | Printing using Econet printer servers |
DOSFS | Provides access to Microsoft DOS formatted discs |
ResourceFS | Internal filing system that contains resources needed by other Operating System modules, such as the Window Manager |
SystemDevice | A module to access various system devices |
The RISC OS file system commonly use two modules called FileSwitch and FileCore. These two modules provide much of the functionality required for filing systems. They are both device independent. i.e they do not access hardware directly. We will briefly discuss both of these modules next.
FileSwitch is a module that is at the heart of all filing systems in RISC OS. It provides a common set of functions that is used by all filing systems. It only provides the parts of these services that are device independent.
By using a predefined interface, it notifies filing systems when they must do certain actions. It also switches between the currently active filing system and keeping the state of each of them.
Any services that are device specific are not provided by FileSwitch, but by separate modules.
Because FileSwitch works with more than one filing system it has to ensure it knows what filing systems are active, and switch between them as necessary.
When filing systems are initialised, they inform FileSwitch of three important pieces of information.
Filing systems can be added to the Operating System easily by adding a module to the system. As FileSwitch provides many common functionality, the filing system modules must provide all remaining functionality.
More detailed information on adding a filing system can be found in the Writing A Filing System? section.
The data format of a filing system is not defined by the FileSwitch module. It only specifies what the user interface must look like.
More information can be found in the FileSwitch section.
The FileCore module provides a core set of services required for a filing system. The module is device independent. i.e it does not access hardware directly. It takes the normal calls that FileSwitch sends to a filing system module and converts them to a simpler set of calls to other secondary modules that actually access the hardware.
Unlike FileSwitch however, it creates a new instance of itself for each module it supports.
ADFS and RamFS are two examples of filing systems that work with FileCore. Both ADFS and RamFS modules access the hardware, but work in conjunction with FileSwitch and FileCore to provide a full filing system.
FileCore is useful as the basis for wring new filing systems because it provides much of the functionality required, although a separate module will be required to access the hardware directly. However, it does impose a more rigid structure on it, as more of the filing system is predefined. The filing system will appear very similar to ADFS or RamFS, as both of these filing systems utilise FileCore.
More information can be found in the FileCore section.
DeviceFS is a filing system module that coverts the normal calls that FileSwitch sends to a filing system into a simpler set of calls to modules that control the hardware. Its intended purpose is for stream-based Input/Output. The secondary modules that control the hardware are known as device drivers. Two examples of device drivers are the serial and parallel ports. Only a single instance of DeviceFS is required.
Additional device drivers can be added to RISC OS by creating a new device driver module.
More information can be found in the DeviceFS section.
In addition to supporting standard filing systems, RISC OS also provides support for image filing systems. They differ from standard filing systems because they do not provide access to hardware themselves, but rely on a standard filing system to do so. An example of an image filing system is DOSFS, which is used to handle DOS format discs.
Image file systems provide three important functions.
The image file system uses FileSwitch and the standard file system to manage files within an image file, although the host system does not need to be aware of image filing systems to support this functionality. It is provided in a seamless and transparent way to the end user.
Identifying format of foreign media is managed by using a service call. The host filing system does need to be aware of image filing systems to provide this functionality.
Formatting is provided by the host system, but needs to be aware of image filing systems to support this functionality.
More information can be found in the Writing A Filing System? section.
The Filer? module is another very important module. It is used to display files and directories on the desktop, and also the functionality to interact with them. It uses a standard set of calls to do this, and hence will work with any filing system, and indeed is used for all filing systems.
However, filing systems can also provide their own filers that co-operate with the more system-wide Filer.
Each filing system that provides an icon on the icon bar has a Filer module to do this. Filing system specific filers can also provide other operations which are not sufficiently generic to be provided by the Filer. e.g Format and Verify operations provided by the ADFSFiler.
A Filer module can use service calls to interact with image filing system, and add their formats to its menu of those it already supports.
More information can be found in The Filer? section.
The Filer_Action module provides the functions that perform the operation on files and directories on behalf of the Filer. The module of course performs the actions in the background so other tasks can carry on.
A list of the SWIs provided by Filer_Action module is available.