How to rename an private file of my application?
<p>I want to rename an context private file created with openFileOutput() but I don't know how...</p>

<p>I tried that:</p>

<pre><code>File file = getFileStreamPath(optionsMenuView.getPlaylistName()); // this file already exists

                try {
                    FileOutputStream outStream = openFileOutput(newPlaylistName, Context.MODE_WORLD_READABLE); // i create a new file with the new name
                    outStream.close();
                }
                catch (FileNotFoundException e) {
                    Log.e(TAG, "file not found!");
                    e.printStackTrace();
                } 
                catch (IOException e) {

                    Log.e(TAG, "IO exception");
                    e.printStackTrace();
                }                           

                Log.e(TAG, "rename status: " + file.renameTo(getFileStreamPath(newPlaylistName))); //it return true 
</code></pre>

<p>This code throw FileNotFoundException but the documentation said "Open a private file associated with this Context's application package for writing. <strong>Creates the file if it doesn't already exist</strong>." so the new file should be created on disk.
 The problem: When I try to read from the new renamed file I got FileNotFoundException!</p>

<p>Thank you!</p>
