title: How can I create a directory in BlackBerry internal memory
body: <p>I am trying to create a directory to store my application's files in the BlackBerry's internal memory. Here's the code: </p>
  
  <pre><code>String uri = "file:///store/testapp/";
  FileConnection dir;
  try {
      dir = (FileConnection)Connector.open(uri, Connector.READ_WRITE);
      if (!dir.exists()){             
          dir.mkdir();    
      }
      dir.close();    
  
  } catch (IOException e) {
      System.out.println(e.getMessage());
  }
  </code></pre>
  
  <p>When I run the above I get an <code>IOException</code> with the message "File System Error (12)". Looking this up in the list of <a href="http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/io/file/FileIOException.html#INVALID_OPERATION" rel="nofollow">BlackBerry constant values</a> this corresponds to "The operation requested is invalid.". Why can't I create the <code>testapp</code> directory?</p>