I want to edit my question.
If file still not exist, download and save it, that my case. To check if file exist, I've try by this code
private boolean isXmlFileExist(){
try{
FileConnection fCon = (FileConnection) Connector.open("file:///"+Resource.XML_PATH + "/" + Resource.XML_FILENAME, Connector.READ);
return fCon.exists();
}catch (Exception e) {
e.printStackTrace();
return false;
}
}
In my resource class
public static final String XML_PATH = "/xml";
public static final String XML_FILENAME = "template.xml";
I have create 'xml' folder under res folder and i have put file 'template.xml' there. But this code always return false. Whether we can not use the res folder? So, what is the correct path.