Symbian Developer Library

SYMBIAN OS V6.1 EXAMPLE CODE

[Index] [Previous] [Next]



File server example code

These examples relate to the file server. They are all text console programs and do not use the GUI environment at all. The Emulator closes when each example terminates.


BasicSession—hello file server

Found in: epoc32ex\Base\FileServer\BasicSession


Description

BasicSession connects to and disconnects from the file server (and prints “Hello File Server!” to the console).


Classes used

[Top]


Connecting—connection to file server

Found in: epoc32ex\Base\FileServer\Connecting


Description

Connecting connects to the file server, then retrieves the default session and system paths. It demonstrates what happens to the session path of an existing and a new connection when the system and session paths are changed.


Running the example

The code creates a directory called \f32test\ and deletes it before exiting.


Types used

[Top]


DriveInfo—drive lists and drive and volume information

Found in: epoc32ex\Base\FileServer\DriveInfo


Description

The DriveInfo example retrieves a list of the available drives, the type of media present in each drive, the media and drive attributes and volume information.


Classes used

[Top]


Attributes—directory entry details and listings

Found in: epoc32ex\Base\FileServer\Attributes


Description

Attributes is an example of how to create a file, and retrieve its entry details and attributes. This demonstrates the use of the TEntry class. A CDir object contains an array of TEntrys which may be retrieved by a call to RFs::GetDir().


Running the example

The code creates several files and directories inside a top level directory called \f32examp\ on the default drive. Before the program terminates, all files and directories created by the program are deleted.


Classes used

[Top]


Filenames—parsing filenames

Found in: epoc32ex\Base\FileServer\Filenames


Description

Filenames demonstrates using class TParse to parse, interrogate and extract components from filenames. Using a single path name, it demonstrates a simple parse using TParse::Set(), and how the components of the path name are retrieved. It then demonstrates parsing using RFs::Parse() with default and related paths.


Classes used

[Top]


NotifyCFileMan observer

Found in: epoc32ex\Base\FileServer\Notify


Description

Notify demonstrates using MFileManObserver to observe a file copy operation carried out through the file management class CFileMan. The build process puts a file, dateFile, on the C drive. The program copies this to a new file, dateFileCopy, using MFileManObserver to report the progress of the operation.


Classes used