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 serverBasicSession
connects to and disconnects from the
file server (and prints “Hello File Server!” to the
console).
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.
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.
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
TEntry
s which may be retrieved by a call to
RFs::GetDir()
.
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.
TEntry
: Directory entry
TTime
: Date/time representation
CDir
: Directory
RFile
: File
TFileName
: File name
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.
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.
CFileMan
: File management
MFileManObserver
: File management observer