Updated Branches: refs/heads/master e4c3cec99 -> 818ecbf8c
Fix issue in docs where DirectoryEntry is created incorrectly Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/commit/818ecbf8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/tree/818ecbf8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/diff/818ecbf8 Branch: refs/heads/master Commit: 818ecbf8c5000478a98df9fc1f8d5cd2f62df999 Parents: e4c3cec Author: macdonst <simon.macdon...@gmail.com> Authored: Wed Jun 6 13:00:57 2012 -0400 Committer: macdonst <simon.macdon...@gmail.com> Committed: Wed Jun 6 13:00:57 2012 -0400 ---------------------------------------------------------------------- .../cordova/file/directoryentry/directoryentry.md | 6 ++++-- docs/en/1.8.0/cordova/file/fileentry/fileentry.md | 6 ++++-- .../cordova/file/directoryentry/directoryentry.md | 6 ++++-- docs/en/edge/cordova/file/fileentry/fileentry.md | 6 ++++-- 4 files changed, 16 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/818ecbf8/docs/en/1.8.0/cordova/file/directoryentry/directoryentry.md ---------------------------------------------------------------------- diff --git a/docs/en/1.8.0/cordova/file/directoryentry/directoryentry.md b/docs/en/1.8.0/cordova/file/directoryentry/directoryentry.md index bafb26b..2c44d42 100644 --- a/docs/en/1.8.0/cordova/file/directoryentry/directoryentry.md +++ b/docs/en/1.8.0/cordova/file/directoryentry/directoryentry.md @@ -146,8 +146,9 @@ __Quick Example__ function moveDir(entry) { var parent = document.getElementById('parent').value, + parentName = parent.substring(parent.lastIndexOf('/')+1), newName = document.getElementById('newName').value, - parentEntry = new DirectoryEntry({fullPath: parent}); + parentEntry = new DirectoryEntry(parentName, parent); // move the directory to a new directory and rename it entry.moveTo(parentEntry, newName, success, fail); @@ -183,8 +184,9 @@ __Quick Example__ function copyDir(entry) { var parent = document.getElementById('parent').value, + parentName = parent.substring(parent.lastIndexOf('/')+1), newName = document.getElementById('newName').value, - parentEntry = new DirectoryEntry({fullPath: parent}); + parentEntry = new DirectoryEntry(parentName, parent); // copy the directory to a new directory and rename it entry.copyTo(parentEntry, newName, success, fail); http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/818ecbf8/docs/en/1.8.0/cordova/file/fileentry/fileentry.md ---------------------------------------------------------------------- diff --git a/docs/en/1.8.0/cordova/file/fileentry/fileentry.md b/docs/en/1.8.0/cordova/file/fileentry/fileentry.md index cc023fe..0fdfd1a 100644 --- a/docs/en/1.8.0/cordova/file/fileentry/fileentry.md +++ b/docs/en/1.8.0/cordova/file/fileentry/fileentry.md @@ -143,7 +143,8 @@ __Quick Example__ function moveFile(entry) { var parent = document.getElementById('parent').value, - parentEntry = new DirectoryEntry({fullPath: parent}); + parentName = parent.substring(parent.lastIndexOf('/')+1), + parentEntry = new DirectoryEntry(parentName, parent); // move the file to a new directory and rename it entry.moveTo(parentEntry, "newFile.txt", success, fail); @@ -177,7 +178,8 @@ __Quick Example__ function copyFile(entry) { var parent = document.getElementById('parent').value, - parentEntry = new DirectoryEntry({fullPath: parent}); + parentName = parent.substring(parent.lastIndexOf('/')+1), + parentEntry = new DirectoryEntry(parentName, parent); // copy the file to a new directory and rename it entry.copyTo(parentEntry, "file.copy", success, fail); http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/818ecbf8/docs/en/edge/cordova/file/directoryentry/directoryentry.md ---------------------------------------------------------------------- diff --git a/docs/en/edge/cordova/file/directoryentry/directoryentry.md b/docs/en/edge/cordova/file/directoryentry/directoryentry.md index bafb26b..2c44d42 100644 --- a/docs/en/edge/cordova/file/directoryentry/directoryentry.md +++ b/docs/en/edge/cordova/file/directoryentry/directoryentry.md @@ -146,8 +146,9 @@ __Quick Example__ function moveDir(entry) { var parent = document.getElementById('parent').value, + parentName = parent.substring(parent.lastIndexOf('/')+1), newName = document.getElementById('newName').value, - parentEntry = new DirectoryEntry({fullPath: parent}); + parentEntry = new DirectoryEntry(parentName, parent); // move the directory to a new directory and rename it entry.moveTo(parentEntry, newName, success, fail); @@ -183,8 +184,9 @@ __Quick Example__ function copyDir(entry) { var parent = document.getElementById('parent').value, + parentName = parent.substring(parent.lastIndexOf('/')+1), newName = document.getElementById('newName').value, - parentEntry = new DirectoryEntry({fullPath: parent}); + parentEntry = new DirectoryEntry(parentName, parent); // copy the directory to a new directory and rename it entry.copyTo(parentEntry, newName, success, fail); http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/818ecbf8/docs/en/edge/cordova/file/fileentry/fileentry.md ---------------------------------------------------------------------- diff --git a/docs/en/edge/cordova/file/fileentry/fileentry.md b/docs/en/edge/cordova/file/fileentry/fileentry.md index cc023fe..0fdfd1a 100644 --- a/docs/en/edge/cordova/file/fileentry/fileentry.md +++ b/docs/en/edge/cordova/file/fileentry/fileentry.md @@ -143,7 +143,8 @@ __Quick Example__ function moveFile(entry) { var parent = document.getElementById('parent').value, - parentEntry = new DirectoryEntry({fullPath: parent}); + parentName = parent.substring(parent.lastIndexOf('/')+1), + parentEntry = new DirectoryEntry(parentName, parent); // move the file to a new directory and rename it entry.moveTo(parentEntry, "newFile.txt", success, fail); @@ -177,7 +178,8 @@ __Quick Example__ function copyFile(entry) { var parent = document.getElementById('parent').value, - parentEntry = new DirectoryEntry({fullPath: parent}); + parentName = parent.substring(parent.lastIndexOf('/')+1), + parentEntry = new DirectoryEntry(parentName, parent); // copy the file to a new directory and rename it entry.copyTo(parentEntry, "file.copy", success, fail);