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.
For more options, visit https://groups.google.com/d/optout.