How can I save a file in a selected folder in Java?
I need it like this: storage/emulated/0/myfile.txt
Is there is an example?
Asked
Active
Viewed 60 times
-1
-
this might be the answer for your question. https://stackoverflow.com/a/28184936/12913325 – JAY_Panchal Apr 01 '22 at 18:30
1 Answers
0
try (PrintWriter out = new PrintWriter("storage/emulated/0/myfile.txt")) {
out.println(text);
}
If this is not what you want you'll have to add more details
Brentspine
- 226
- 10