title: Folder creates as a file
body: <p>CONFUSED: Those who down vote a question, could you add some comments, why???? I want to say bad words, just dont want to get banned.</p>
  
  <p>I do have an app and I want to have a folder in sdCard so users can add some stuff and then i can use it inside the app. I use the following code to create a folder:</p>
  
  <pre><code>    @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          //External storage
          boolean mExternalStorageAvailable = false;
          boolean mExternalStorageWriteable = false;
          String state = Environment.getExternalStorageState();
  
          if (Environment.MEDIA_MOUNTED.equals(state)) {
              // We can read and write the media
              mExternalStorageAvailable = mExternalStorageWriteable = true;
              Log.v("Storage","ablo to read and write");
              //create Beatss folder
              File direct = new File(android.os.Environment.getExternalStorageDirectory().getPath() + "/Beatss");
              Log.v("Storage",android.os.Environment.getExternalStorageDirectory().getPath() + "/Beatss");
                  boolean success = true;
                  if (!direct.exists()) {
                      success = direct.mkdirs();
  
                  }
                  if (success) {
                      // Do something on success
                      Log.v("Storage","Folder has been created");
  
                  } else {
                      // Do something else on failure 
  
                  }
  
          } else if (Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {
              // We can only read the media
              mExternalStorageAvailable = true;
              mExternalStorageWriteable = false;
              Log.v("Storage","ablo to read only");
          } else {
  
              mExternalStorageAvailable = mExternalStorageWriteable = false;
              Log.v("Storage","no access");               
          }
  </code></pre>
  
  <p>I can see in DDMS that folder has been created but when i go through WindowsExplorer I have a file instead of a folder. So, how to create a folder?</p>
  
  <p>UPD1: So, even when i create something inside this folder, i still have it as a file inside the windows explorer, but inside the DDMS i can see that i have a folder and inside it another folder. So, what is wrong here?? </p>
  
  <p>UPD2: So, breaked up <code>direct</code> line in logcat to see if there is a real path:</p>
  
  <pre><code>01-24 21:14:04.368: V/Storage(12116): /mnt/sdcard/Beatss/
  </code></pre>
  
  <p>So there is..</p>
  
  <p>UPD3: I cant show all my code it is 264 lines so far. All this folder creating happens at onCreate of mainActivity. The manifestFile looks like this:</p>
  
  <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="uk.test
  android:versionCode="1"
  android:versionName="1.0"
  android:installLocation="auto" &gt;
  
  &lt;uses-sdk
      android:minSdkVersion="7"
      android:targetSdkVersion="16" /&gt;
  &lt;supports-screens         
                android:smallScreens= "true"
                android:normalScreens="true"
                android:largeScreens="true"
                android:xlargeScreens="false"                  
  /&gt;
  
  
      &lt;uses-permission android:name="android.permission.INTERNET"/&gt; 
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/&gt;
      &lt;uses-permission android:name="android.permission.READ_PHONE_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/&gt;
  
  &lt;application
      android:icon="@drawable/icon"
      android:label="@string/app_name"
      android:theme="@style/AppTheme"
      android:screenOrientation="portrait"
      &gt;
      &lt;activity
          android:name=".Main"
          android:label="@string/app_name"
          android:screenOrientation="portrait" 
          android:clearTaskOnLaunch="true"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
      &lt;activity android:name="com.google.ads.AdActivity"
                android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/&gt;        
      &lt;activity android:name=".MainActivity"
                android:label="@string/app_name"
                android:screenOrientation="portrait"&gt;
      &lt;/activity&gt;
      &lt;activity android:name=".SupportScreen"
                android:label="@string/app_name"
                android:screenOrientation="portrait"&gt;
      &lt;/activity&gt;
          &lt;activity android:name="com.tapjoy.TJCOffersWebView" android:configChanges="keyboardHidden|orientation" /&gt;
          &lt;activity android:name="com.tapjoy.TapjoyFullScreenAdWebView" android:configChanges="keyboardHidden|orientation" /&gt;
          &lt;activity android:name="com.tapjoy.TapjoyDailyRewardAdWebView" android:configChanges="keyboardHidden|orientation" /&gt;
          &lt;activity android:name="com.tapjoy.TapjoyVideoView" android:configChanges="keyboardHidden|orientation" /&gt;
  
  &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>Update code upper:</p>
  
  <p>Logcat says:</p>
  
  <pre><code>01-24 21:19:21.068: V/Storage(14088): /mnt/sdcard/Beatss/
  01-24 21:19:21.138: V/Storage(14088): Folder has been created
  </code></pre>