Ejemplo n.º 1
0
// -----------------------------------------------------------------------------
// Shared by GetBtEskFilename and GetIrdaEskFilename
// -----------------------------------------------------------------------------
static void GetEskFilename( TDes& aBuff, const TDesC& aFileName )
{
    TInt maxLen = aBuff.MaxLength();
    aBuff.SetLength(maxLen);
    ::GetModuleFileName(NULL, &(aBuff[0]), maxLen);
    aBuff[aBuff.MaxLength() - 1] = 0;
    aBuff.SetLength(User::StringLength(aBuff.Ptr()));
    aBuff.SetLength(aBuff.LocateReverse('\\') + 1);
    aBuff.Append(_L( "z\\private\\101f7989\\ESock\\"));
    aBuff.Append(aFileName);
    aBuff.ZeroTerminate();
}
Ejemplo n.º 2
0
TBool CYCSettingList::AdjustFolder(TDes& aDes)
{
    //是否'/'结尾.
    TInt pos = aDes.LocateReverse('\\');
    if (pos != aDes.Length() - 1)
        aDes.Append('\\');

    //是否存在文件夹
    if (BaflUtils::PathExists(CCoeEnv::Static()->FsSession(),aDes))
    {
        return ETrue;
    }
    else
    {
        ShowInfomationDlgL(R_TEXT_DLG_INPUT_FOLDER_ERROR);
        return EFalse;
    }
}
Ejemplo n.º 3
0
void GetFileNameByPath(const TDesC& aFilePath, TDes& aFileName)
{
	TInt filePathLength = aFileName.LocateReverse('\\') + 1;
	aFileName = aFileName.Mid(filePathLength);
}