Search code examples
androidinternal-storage

Internal storage folders and files


I have folder with assets. and i need to copy all media to

data/data/packagename/

and create there 5 folders for sounds imgs, videos. How can I do it???


Solution

  • try following,

     File path=getFilesDir();
     String mypath=path.toString() + "/myfolder";
     OutputStreamWriter out;
     try {
            File  f = new File(mypath , "/myfile.txt"   );
            out = new OutputStreamWriter(openFileOutput(f.getPath(),MODE_PRIVATE));
            out.write("test");
            out.close();                   
         }