0

I am creating a folder through my app

File direct_playlist = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + PLAYLIST_PATH);

            if(!direct_playlist.exists())
             {
                 if(direct_playlist.mkdir()); //directory is created;

             }

Even though the command executes perfectly I can not see the folder in Explorer. I have also given permission to my app in the manifest.xml

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

When I try to access this folder my app crashes as the folder is not present.

Ankuj
  • 713
  • 3
  • 10
  • 27

1 Answers1

0

This topic is already discussed So Use Following threads..

How to check if newly created folder is present into SD Card in Android

Creating a directory in /sdcard fails

It will surely help you.

Community
  • 1
  • 1
Saqqib
  • 276
  • 1
  • 7
  • Use "/" instead of File.seprator...may be they help. And If your playlist path contain more than one directory..Use "direct_playlist.mkdirs()"... – Saqqib Nov 01 '12 at 14:16