RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Software | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

Introduction To Filing Systems

Programmer's Reference Manuals
» Part 4 – Using Filing Systems
» Introduction to Filing Systems

Introduction To Filing Systems

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

Overview

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.

Filing System Management

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.

  1. Identify their name
  2. Identify where to find the routines for controlling the hardware
  3. Identify any special actions that the filing system can perform

Adding Filing Systems

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.

Data Format

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.

FileCore

Overview

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

Overview

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.

Image Filing Systems

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.

  1. Handle files held within an image file
  2. Identify the format of foreign media
  3. Provide assistance in the formatting the media

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

Overview

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.

Filer_Action

Overview

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.

See also

  • DeviceFS?
  • FileCore
  • Filers?
  • FileSwitch
  • Filer_Action?
  • The Filer?
  • Writing A Filing System?
Revised on December 29, 2010 21:24:50 by Trevor Johnson (329)? (127.0.0.1)
Edit | Back in time (2 revisions) | See changes | History | Views: Print | Source | Linked from: Programmer's Reference Manuals, Part 4

Search the Wiki

Commercial use

For commercial enquiries, please contact the owners of RISC OS, Castle Technology Ltd.

ROOL Store

The official C/C++ Development kit and more here.

Donate! Why?

Help ROOL make things happen – please consider donating!

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2011 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys