Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



How to use file server sessions

TheRfs class represents a session with the file server. The following code demonstrates the use of the system default path and the session path and shows how to connect and disconnect to and from the file server.

_LIT(KDefault,"Default path for fsSession is %S\n");
_LIT(KSession,"Session path for fsSession is %S\n");
RFs fsSession;
User::LeaveIfError(fsSession.Connect());
TFileName path;
User::LeaveIfError(fsSession.DefaultPath(path));
console->Printf(KDefault,&path);
User::LeaveIfError(fsSession.SessionPath(path));
console->Printf(KSession,&path);
...
...
fsSession.Close();


Notes