As yucca told it is not allowed . leisurelife_kbj i can suggest u a
logic
1:Identify when is my first launch:
on installation place a file example:"CheckStatusInstallation.txt" having a flag 0 and then on first launch write 1 to it.Then when u launch for the second time u check the content of the time if it is 1 then it means that it is not your first launch.Bundle this "CheckStatusInstallation.txt" with a default value 0
2: Delete the file or folder on the first launch:
As you now know that this is the first launch. Try a run a code in constructor to delete that specific folder or file.
Code:
void MyClassContainer:Constructor()
{
//
.......
//
TRAPD(r,CheckStatusL());
}
void MyClassContainer::CheckStatusL()
{
_LIT(FileToDelete,"myfiletodelete.txt")
RFs fs;
//initialise fs.
RFile file;
//initialise fs.
TInt Status;
if (KErrNone == file.Open(fs, _L("CheckStatusInstallation.txt"), EFileRead))
{
CleanupClosePushL(file);
TInt Size = 0;
file.Size(Size);
TBuf8<10> tmp;
file.Read(tmp, tmp.MaxLength());
TLex8 lex(tmp);
lex.Val(DbStatus);
CleanupStack::PopAndDestroy(); //file
if (DbStatus == 0)
{
if (BaflUtils::FileExists(fs, FileToDelete)) //delete the file
{
}
//if you want to delete a folder write a code here
}
}
//check and close file,fs if not will get alloc error
}