×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Mar 2005
    Posts
    77

    User file removal using FILENULL

    Hi,

    I am trying to use the .PKG file option to remove a user file from the phone on uninstall. My app generates the file at runtime, it is the main settings file for the app. I enclose the .PKG file lines used :-

    &EN
    ;
    ; UID is the app's UID
    ;
    #{"SaveCell"},(0x2000fec2),1,1,0
    ;
    ;Supports Series 60 v 2.0
    ;This line indicates that this installation is for the Series 60 platform v2.0
    ;This line must appear _exactly_ as shown below in the sis file
    ;If this line is missing or incorrect, the sis file will not be able
    ;to be installed on Series 60 v2.0 platforms
    (0x101F7960), 0, 0, 0, {"Series60ProductID"}
    ;
    ;
    "c:\savecell\sis\subscription.txt" - " ",FILETEXT,TEXTEXIT
    ;Remove our files on uninstall
    "" - "c:\SaveCellMain.ini",FN
    "" - "c\SaveCellMain.ini",FN
    "" - "!:\SaveCellMain.ini",FN
    "" - "c:\SaveCellQueue",FN
    "" - "c:\SaveCellTemp",FN
    "" - "c:\SaveCellMsId",FN
    "" - "c:\SaveCellDataQueue",FN
    "" - "c:\SaveCellAlienIDS",FN
    "" - "c:\logs\SaveCell",FN

    As you can see, I have three tries at removing the file SaveCell.ini, but it does not work on uninstall, and the file remains. The path to the file is shown by FExplorer as "C:\SaveCellMain.ini".

    The SDK is S60 7.0s, the phone is 7610 SW version v 4.0437.4 15-09-04 RH-51, and I am using Carbide 1.3 Build 024.

    The line "" - "c\SaveCellMain.ini",FN looks a bit odd, but I included it because that is how the line is shown in "http://wiki.forum.nokia.com/index.php/Advanced_Package_File_Options".

    The app was installed into phone memory.

    Any ideas?

    Richard

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

    Re: User file removal using FILENULL

    Quote Originally Posted by 76Richard76 View Post
    The app was installed into phone memory.
    How do you create the file and how do you check that it remains in place? Remember that the built-in file manager shows C:\Data (or c:\Nokia? - PathInfo API actually knows that) as phone memory root.

  3. #3
    Regular Contributor
    Join Date
    Mar 2005
    Posts
    77

    Re: User file removal using FILENULL

    Hi wizard_hu_,

    Thank you for your reply.

    The file was created using the following code, which is called during the ConstructL phase of the AppUi :-

    TInt result=0;
    RFile file;
    RFs Session;
    User::LeaveIfError(Session.Connect());
    CleanupClosePushL(Session);

    result = file.Replace(Session, KMainFileName, EFileWrite);

    if (result == KErrNone)
    {
    file.Close();
    CleanupStack::PopAndDestroy(&Session);
    SetInitialConditionsL(); //Set up the default values in it
    return (scWriteMainFileL()); // save initial version
    }
    else
    {
    CleanupStack::PopAndDestroy(&Session);
    User::Leave(result);
    }


    KMainFileName is _LIT(KMainFileName, "SaveCellMain.ini");

    I check for the continued existence of the file by using FExplorer. I exit and re-enter FExplorer to make sure it's screen is refreshed after uninstalling the app. The file appears in the root of the phone C: drive, as C:\SaveCellMain.ini.

    Is the installation manager trying to delete "C:\Data\SaveCellMain.ini" ??

    If so, I can understand what is going wrong, but it would have been nice to be told that in the Nokia Developer Library article.

    Richard

  4. #4
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Re: User file removal using FILENULL

    This is a known issue with S60 v7.0 based phones. I am quoting from SDK help.

    Question:
    My application creates a document file, which I normally remove during uninstallation using the FILENULL (FN) option. This used to work, but doesn't on my Symbian OS v7.0s based phones. Why not?
    How can I pass the PKG-03 test?

    Answer:
    There is a known issue in Symbian OS v7.0s that means the FILENULL (FN) option does not work. Therefore, while files installed with the application will be removed on uninstall, files that are dynamically created by the application at run-time will not be.

    This issue affects all Symbian OS v7.0s phones (at time of writing) except early versions of the Nokia 6600.

    Should your application require this functionality, the test house will grant a "not testable" (NT) exception against the PKG-03 test. You should indicate whether this exception is required in the readme.txt you submit with your application.

    Reference: SDK help
    Nokia Developer Wiki Moderation team

  5. #5
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Re: User file removal using FILENULL

    Nokia Developer Wiki Moderation team

  6. #6
    Regular Contributor
    Join Date
    Mar 2005
    Posts
    77

    Re: User file removal using FILENULL

    Hi Kieran,

    Thank you for that, I had only searched the Forum, not the Wiki. At least it is now in the forum.

    Richard

  7. #7
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Cool Re: User file removal using FILENULL

    Quote Originally Posted by 76Richard76 View Post
    Hi Kieran,

    Thank you for that, I had only searched the Forum, not the Wiki. At least it is now in the forum.

    Richard
    And that is what all said in my signature.... ;)

    Kiran.
    Nokia Developer Wiki Moderation team

  8. #8
    Regular Contributor
    Join Date
    Mar 2005
    Posts
    77

    Re: User file removal using FILENULL

    Thanks again Kiran,

    Would it be possible to adapt the Forum to automatically search the Wiki, whenver a search is put into the Forum?

    It would seem to be an easy way of reducing redundant questions...

    Richard

Similar Threads

  1. Tranfering file by bluetooth
    By hassan83 in forum Symbian
    Replies: 5
    Last Post: 2008-04-18, 17:01
  2. problem when importing from carbide c++ to vs 2003!
    By misfit.physics in forum Symbian Tools & SDKs
    Replies: 12
    Last Post: 2008-02-19, 09:45
  3. Replies: 1
    Last Post: 2005-05-26, 14:22
  4. prevent user from modify or delete a file?
    By manmli in forum Symbian
    Replies: 2
    Last Post: 2005-02-11, 17:26

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×