Home arrow Developer arrow Symbian C++ arrow Application Drive And Path  
 
Main Menu
Home
Developer
Downloads
Links
Contact Us

 

 
Application Drive And Path PDF Print E-mail
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);
        
    }

 
< Prev   Next >
© 2010 mobilenme.com