title: Android special directories
body: <p>I see that as of API Level 8, you can request a handle to special directories with <code>Environment.getExternalStoragePublicDirectory()</code>. This takes a type such as <code>DIRECTORY_MUSIC</code>, <code>DIRECTORY_PICTURES</code>, etc.</p>
  
  <p>I'm looking for an equivalent directory for other media types such as documents (Word docs, PDFs, etc.). My HTC Desire has a <code>/sdcard/My Documents/</code> folder which looks like exactly what I want, but it has no <code>DIRECTORY_</code> specifier for use with the above method. Is this a standard Android directory which I can rely on?</p>
  
  <p>If I can't use <code>getExternalStoragePublicDirectory()</code>, I have to use <code>getExternalStorageDirectory()</code> instead which just points me to the root of the SD card. I can explicitly check for the presence of <code>My Documents</code> under the root and use it if it's there.</p>
  
  <p>This is what I have:</p>
  
  <pre><code> // default document save location
   File defaultSaveDir = Environment.getExternalStorageDirectory();
   File myDocs         = new File(defaultSaveDir, "My Documents");
   if (myDocs.exists() &amp;&amp; myDocs.isDirectory())
       defaultSaveDir = myDocs;
  </code></pre>
  
  <p>Is there a better way?</p>