05-22-2012 06:45 AM
Hello all,
like file///:sdcard
can we create a folder in file:///store....which shold visible to user.
Solved! Go to Solution.
05-22-2012 07:09 AM
YES.. u can create it in... file:///store/home/user/documents/new_folder .... like kind of a structure.. not directly in file:///store ....
05-22-2012 07:34 AM
thanks
05-22-2012 07:40 AM
i use this code..but not created
import net.rim.device.api.system.Application;
import javax.microedition.io.*;
import javax.microedition.io.file.*;
import java.io.IOException;
public class CreateFolderApp extends Application
{
public static void main(String[] args)
{
CreateFolderApp app = new CreateFolderApp();
app.setAcceptEvents(false);
try
{ // the final slash in the folder path is required
FileConnection fc = (FileConnection)Connector.open("file:///store/home /user/documents/new_folder");
// If no exception is thrown, the URI is valid but the folder may not exist.
if (!fc.exists())
{
fc.mkdir(); // create the folder if it doesn't exist
}
fc.close();
}
catch (IOException ioe)
{
System.out.println(ioe.getMessage() );
}
}
}
I did This But folder not created in documents
05-22-2012 08:09 AM
try this path
file:///store/home/user/documents/new_folder/
Put a slash at the end. This will work
05-22-2012 08:18 AM
Thanks rabi ![]()