Apple Lisa — 1.3 The File System

Operating System Reference Manual Introduction AH calls to the OS are synchronous, which means they do not return until the operation ls complete. Each call retums an error code to indicate if anything went wrong during the operation. Any non-zero value Indicates an error or waming. Negative error codes indicate warnings. For a list of error codes and their meaning, see Appendix D. 1.3 The File System The File System performs all IA) as uninterpreted byte streams. These byte streams can go to files on disk or to other devices such as a printer or an alternative console. In all cases, the device or file has a File System name.

Except for device-control functions, the File System treats devices and files in the same way. The File system provides for naming objects (devices, fUes, etc.> A name ln the File System ls called a pathname A complete pathname consists of a directory name and a file name. The file name is meaningful only for storage devices (devices that store byte streams for later use, such as dlsks> The File System allows sharing of all types of objects. Each process has a working directory associated with it. This allows you to reference objects with an incomplete pathname. To access an object in the working directory, you specify lts file name.

To access an object in a different directory, you specify its complete pathname. Before a device can be accessed, it must be mounted. Devices can be mounted using the Preferences tool or by using the MOUNT call. See Chapter 2 for an explanation of this call and other File System calls. If the device is a storage device, the mount operation makes a volume name available. A volume name is a logical name for a disk, and is saved on the disk itself. The mount operation logically connects the volume to the system, so that the files on the volume may be accessed. The volume name can replace a device name ln a pathname used to access an object on the disk.

The volume name allows you to access a file with the same pathname no matter where the drive is actually connected. A device can be accessed if it is specified in the configuration list created by the Preferences tool, is physically connected to the Lisa, and is mounted. There are some operations that can be performed on unmounted devices. Two examples are DEVlCEjCCNTROL calls and scavenging. Logically mounting a volume on a device makes file access to the volume possible. For storage devices, a volume is an actual magnetic medium that can contain recorded files. For non-storage devices, volumes and files are concepts used to maintain a uniform interface.

Files on non-storage devices such as printers do not store data but act as ports for performing I/O to the devices. 1-2