|
Application Drive And Path |
|
|
|
|
Wednesday, 09 May 2007 |
|
#include "xxApplication.h" Also include apparc.h & apparc.lib _LIT(KCDrive, "C:"); void CxxAppUi::ApplicationDriveAndPath(TFileName& aPath) { RFs fsSession; User::LeaveIfError(fsSession.Connect()); CleanupClosePushL(fsSession); TFileName appfullname, fn; appfullname = Application()->AppFullName(); fsSession.PrivatePath(fn); #ifndef __WINSCW__ TParse parse; parse.Set(appfullname, NULL, NULL); fn.Insert(0,parse.Drive()); #else // In device use the application fullname directly. fn.Insert(0,KCDrive); #endif //BaflUtils::EnsurePathExistsL(fsSession, fn); aPath = fn; CleanupStack::PopAndDestroy(&fsSession); }
|