Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor komomo's Avatar
    Join Date
    Mar 2010
    Posts
    136
    In the book I read, it said that “You should immediately call close() on the FileConnection after a delete(). The FileConnection is no longer valid once the underlying file has been deleted”
    But in my program, although I have done deletion, I can still use the instance of reference to the FileConnection.
    Why?
    Code:
    fileconnection=(FileConnection) Connector.open("file:///root1/createfile.PNG",Connector.READ_WRITE);
    			fileconnection.create();
    			fileconnection.delete();
    			System.out.println(fileconnection.usedSize());
    			fileconnection.create();
    
    /////////////////////////it rename file but give error
    fileconnection.rename(“rename.png”);

  2. #2
    Registered User ektasrv's Avatar
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941
    After calling delete() if create() is called it will creates a new file, but if you try to rename after delete it gives error because no physical file is present to rename.
    Thanks,
    Ekta

Similar Threads

  1. FileConnection
    By dakz in forum Mobile Java General
    Replies: 17
    Last Post: 2008-11-29, 08:38
  2. FileConnection not available
    By stein in forum Mobile Java General
    Replies: 11
    Last Post: 2007-09-05, 06:30
  3. FileConnection
    By martinmydlar in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2007-02-05, 00:08
  4. help regarding Fileconnection
    By mottaisami in forum Mobile Java General
    Replies: 0
    Last Post: 2005-10-22, 06:24
  5. Fileconnection
    By lpinguin in forum Mobile Java General
    Replies: 0
    Last Post: 2005-05-10, 15:31

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved