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