title: How to rename a directory using javascript file system api?
body: <p>How to rename a directory using JavaScript file system API?</p>
  
  <p>I tried as given below:</p>
  
  <pre><code>dirNameWithPath = '/MyPictures3/New Folder';
  newDirName = 'newTitle';
  dirPath = '/MyPictures3';
  
  filesystem.root.getDirectory(dirNameWithPath, {}, function(dirEntry) {
      dirEntry.moveTo(dirPath, newDirName, callback, errorHandler);
  }); 
  </code></pre>
  
  <p>I am getting the following error:</p>
  
  <pre><code>FileError.INVALID_MODIFICATION_ERR
  </code></pre>