The younger brother is working on a file name to get the sisinstallation file. Some file names can get the file name, but other file names in 99% cannot get it.
The following code is posted. The principle is that because the sisfile is running, I only need to check which files are running and check whether the suffix is ". if it is, it will not be found. It will be found until it is found or not found.
I have referenced other people's code. The process of searching for file names is almost the same.
Http: // blog.csdn.net/sunlifesunlife/article/details/5976166
The system says I have no permission to send a link ..... Remove spaces)
RFs fs;
TInt err = fs. Connect ();
User: LeaveIfError (err );
CleanupClosePushL (fs );
TFileName aFileName;
TOpenFileScan ofs (fs );
TBool done = EFalse;
_ Partition (KExtSis, ". sis ");
While (! Done)
{
CFileList * fl = NULL;
Ofs. NextL (fl );
If (fl = NULL)
{
Log (_ L ("can't find sisName "));
Done = ETrue;
}
Else
{
CleanupStack: PushL (fl );
TInt count = fl-> Count ();
For (TInt I = 0; (I <count )&&(! Done); I ++)
{
TEntry entry = (* fl) [I];
TParsePtrC parse (entry. iName );
Log (entry. iName );
If (parse. Ext () = KExtSis)
{
AFileName = entry. iName;
Log (aFileName );
Done = ETrue;
}
}
CleanupStack: PopAndDestroy (fl );
}
}
I recorded the names of these files, but I didn't see ". the "sis" suffix or file is the same as the file name I retrieved. I don't know what is wrong, is it wrong to find the method, or ". "sis" is only an installation file. After the installation, it runs programs with other names, so it cannot be found. Please give me some advice. Thank you.