Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



File server session

All files are handled by the file server, using either its local file system, or an installed file system. The server manages i/o activity, and contention, sharing and locking.

Client programs access the file server through a client API defined in f32file.h. This API includes all classes and functions needed for file system, device, directory and file access, and associated utilities.

All access from client to server is through a file server session, an instance of the RFs class. After a client has connected an RFs to the file server, it can perform any file-related operation. An RFs is associated with a single current path: that current path is initialized to the system default path when the RFs is connected, and thereafter is changed only as the client directs.

After operations have been completed, file server-related clean-up should be carried out using Close() defined in the RHandleBase class. Note that for the majority of functions, when a file or directory name is passed as an argument to the function, if no drive letter or directory is specified, the missing path component will be taken from the session path.

Component-based design

Only a single path is supported, and the path includes the drive. Each component must have its own RFs for its file access purposes. This gives each component all the flexibility it needs to maintain its own current path and other settings related to an RFs. There is no limit on the number of RFss available to a single thread.

This is unlike DOS, which effectively maintains 26 current paths, one for each drive. DOS also maintains a current drive, and the effective current path is therefore the current path on the current drive.