File Server Client Side Overview

This topic describes the File Server Client Side overview.

Purpose

Provides an application interface to file systems.

Architectural relationships

File access is provided by an Symbian platform server, the file server. It provides local file systems (ROM, NAND/NOR flash and removable media), and an interface to allow dynamically installable file systems, such as those required to communicate with remote disks over a network.

The drive, directory and file hierarchy is VFAT, thus making the file system naturally compatible with desktop PCs.

Stream stores, as defined in the Stores API, provides a layer over the file interface, and are commonly used instead of the file API directly.

The application architecture, as defined in the Application Architecture Framework API, and associated components, provide the policy for file locations. Because of this, most application programs do not need to know the details of the directory-related APIs.

Some additional utilities are provided in the Application Utilities API.

Description

The API has seven key concepts: file server session, file, directory, drives and volumes, path and filename parser, file management, file searching and directory scanning.

File server session

All access from client to server is through a file server session. It provides file system manipulation functions, including adding, removing, moving and renaming files and directories; inspecting and changing file and directory attributes and entry details; and requesting notifications of when significant change occurs.

The file server session is provided by RFs .

File

A specified file can be opened, created, or replaced. Files must be opened before they are read from or written to. Data in read and write operations is passed through descriptors. Files can also be read and written through the file stream classes provided by the File Stores API.

The file interface is provided by RFile .

Directory

A directory entry is a directory, file or volume label. Directory entries can be read and sorted.

To read through a directory one entry at a time, use RDir . To read many entries at a time, use RFs functions and the associated CDir . The directory entry class is TEntry .

Drives and volumes

A drive corresponds to a logical device. A volume applies to removable media. As users insert and remove individual devices, so different volumes are said to be mounted and demounted. For media types that can be split into partitions, each partition corresponds to a separate volume.

RFs provides means to find out which drives and volumes are present. Information for them is encapsulated in TDriveUnit , TDriveInfo and TVolumeInfo .

Path and filename parser

A filename has the logical parts of drive, path, name, and extension. An interface to manipulate filenames is provided by TParseBase . Concrete implementations are provided by the derived classes, TParse , TParsePtr and TParsePtrC .

File management

Efficient large-scale copying, moving and other file management operations, are provided by CFileMan .

File searching

High-level file finding functionality is provided by TFindFile .

Directory scanning

CDirScan can be used to scan through a directory hierarchy, either up or down, returning a filtered list of the entries contained in each directory.