Monday, October 5, 2009

Create folder in BlackBerry device memory or Memory card-(How to avoid “FileIOException: File system error”)

Creates Folder inside the BlackBerry device programmatically

try
    {
FileConnection fc=(FileConnection)Connector.open

("file:///store/home/user/themes/",Connector.READ_WRITE);

//Give your path as need above path for device memory

//for Memory Card give as file:///SDCard/Themes/

//Do not forget to “/” at the end of name
           if (!fc.exists())
            {
             fc.mkdir();
             Dialog.alert("Created Folder");
            }
    }
    catch(Exception e)
    {
        Dialog.alert("ERROR");
    }

No comments:

Post a Comment