//sorry forgot the imports
import java.io.IOException;
import javax.microedition.io.Conn
import javax.microedition.io.file
public class NewClass {
private String filePath; // Absolute File Path
public void createFile(String dirPath, String fileName) throws IOException{
String pathPrefix = "file:///";
filePath= pathPrefix +dirPath + fileName;//"fileName.txt";
FileConnection fileInfo= (FileConnection)Connector.
if(!fileInfo.exists())
fileInfo.create();
fileInfo.close();
} // createFile
} // class NewClass
Main Topics
Browse All Topics





by: plusone3055Posted on 2009-09-30 at 10:25:59ID: 25461136
public class NewClass {
open(fileP ath, Connector.READ_WRITE);
private String filePath; // Absolute File Path
public void createFile(String dirPath, fileName) throws IOException{
String dirPath= null;
String pathPrefix = "file:///";
filePath= pathPrefix +dirPath + fileName;//"fileName.txt";
FileConnection fileInfo= (FileConnection)Connector.
if(!fileInfo.exists())
fileInfo.create();
fileInfo.close();
} // createFile
}