| Reply | « Previous Thread | Next Thread » |
|
Hi,
I'm developing an application for Series 40 and I want to know if I can read a file from Phone Memory or Card Memory should do to. I've search in the internet and i see FileConnection class. Can I use it? I'm testing on Nokia 6230 and 6230i. The FileConnection do not work so well. I use this function that I found in internet: Code:
private void LoadFile(){
try {
FileConnection fc = (FileConnection) Connector.open("file:///CFCard/");
// Get a filtered list of all files and directories.
// True means: include hidden files.
// To list just visible files and directories, use
// list() with no arguments.
System.out.println
("List of files and directories under CFCard:");
Enumeration filelist = fc.list("*", true);
while(filelist.hasMoreElements()) {
String fileName = (String) filelist.nextElement();
fc = (FileConnection)
Connector.open("file:///CFCard/" + fileName);
if(fc.isDirectory()) {
System.out.println("\tDirectory Name: " + fileName);
} else {
System.out.println
("\tFile Name: " + fileName +
"\tSize: "+fc.fileSize());
}
}
fc.close();
} catch (IOException ioe) {
System.out.println(ioe.getMessage());
}
}
thanks, decisor |
|
6230 does not have FIle Connection API. 6230i should have it.
Also check this document on how to use FileConnection API (there is an example midlet included) http://www.forum.nokia.com/info/sw.n...Notes.txt.html |
|
Hi,
In the phones you have specified,you can access only certain folders under the Gallery.So ensure the folders that you can access and also check the path for file connection. Thanks Soku |
|
Hi,
Here is a tutorial for fileconnection api http://www.forum.nokia.com/info/sw.n..._v1_1.zip.html Wang |
|
Ouch, thanks wang!
I just realized that my post above contains a totally wrong like (thanks to an attempted multitasking...). Decisor, please disregard the link in my post (2nd in this thread), that was not related to this thread. Hartti |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Read from a text file | razas | General Symbian C++ | 2 | 2005-09-12 08:23 |
| socket read hangs until socket is closed | camroe | Mobile Java Networking & Messaging & Security | 1 | 2005-07-21 10:44 |
| Sending .jpg file from phone to PC | ja_calulot | General Symbian C++ | 0 | 2003-09-06 10:34 |
| Some memory related and other issues | sanjg2k1 | General Discussion | 0 | 2003-07-07 18:38 |
| Forward Locking .dm file to a 3650 phone | tsyme | Digital Rights Management & Content Downloading | 1 | 2003-04-11 09:11 |