It is very strange that the IOException is reporting the path with the file:/// prefix. This should have been stripped by the time it gets there. Can you post a full stack trace?
On Tue, Feb 13, 2018 at 1:09 AM, <[email protected]> wrote: > Thanks shai for reply.. I have tried "fs.mkdir(fs.getAppHomePath());" > like below but still i'm getting > >> java.io.IOException: >> file:///data/data/com.engravsystems.emqim/files//MyFileName.pdf >> not found .. >> > > here is the code : > > FileSystemStorage fs = FileSystemStorage.getInstance(); > > try { > > if(!fs.exists(fs.getAppHomePath())) > fs.mkdir(fs.getAppHomePath()); > > OutputStream os = > fs.openOutputStream(fs.getAppHomePath() + "MyFileName.pdf"); > > os.write(hrFiles.get(finalI).get("fileData").toString().getBytes()); > Util.cleanup(os); > } catch (IOException e) { > e.printStackTrace(); > } > > > > > On Tuesday, February 13, 2018 at 10:45:10 AM UTC+5:30, Shai Almog wrote: >> >> I think your code is correct. I think that app home might not exist which >> seems to me like an omission on our part. >> Try >> >> fs.mkdir(fs.getAppHomePath()); >> >> -- > You received this message because you are subscribed to the Google Groups > "CodenameOne Discussions" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > Visit this group at https://groups.google.com/ > group/codenameone-discussions. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/codenameone-discussions/546eb817-a1d9-486b-a507- > 28d94a4a1f86%40googlegroups.com > <https://groups.google.com/d/msgid/codenameone-discussions/546eb817-a1d9-486b-a507-28d94a4a1f86%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Steve Hannah Software Developer Codename One http://www.codenameone.com -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/codenameone-discussions. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/CAGOYrKWxkCUZfYs73G5njb-Q%3D3u63MHY3kf8CHBqLOUsEOfg3Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
