aboutsummaryrefslogtreecommitdiff
path: root/js/io/system/ninjalibrary.js
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-02-08 16:33:09 -0800
committerJose Antonio Marquez2012-02-08 16:33:09 -0800
commitb62b9d5b3dfd1dfacaf9111f85d40dd246d2b90e (patch)
tree377e573aa51f21dfc6ad3afae71f1a7d0c34c2d9 /js/io/system/ninjalibrary.js
parentfb4fdc82afe9ef62402fa3f2ccb5c291f703c7a8 (diff)
downloadninja-b62b9d5b3dfd1dfacaf9111f85d40dd246d2b90e.tar.gz
Adding a purge library method
Added a delete libraries function to delete all libraries in Chrome sandbox (as in a force delete). Also updated descriptor files to go with new directory layout of files and relation to the relatives paths used by the packed app and it's manifest.
Diffstat (limited to 'js/io/system/ninjalibrary.js')
-rw-r--r--js/io/system/ninjalibrary.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/js/io/system/ninjalibrary.js b/js/io/system/ninjalibrary.js
index c85de3b0..fc943323 100644
--- a/js/io/system/ninjalibrary.js
+++ b/js/io/system/ninjalibrary.js
@@ -297,6 +297,24 @@ exports.NinjaLibrary = Montage.create(Object.prototype, {
297 }, 297 },
298 //////////////////////////////////////////////////////////////////// 298 ////////////////////////////////////////////////////////////////////
299 // 299 //
300 deleteLibraries: {
301 enumerable: true,
302 value: function () {
303 function parseLibrary (contents) {
304 //
305 for(var i=0; contents[i]; i++) {
306 //
307 if (contents[i].isDirectory) {
308 this.chromeApi.directoryDelete(contents[i].name);
309 }
310 }
311 };
312 //
313 this.chromeApi.directoryContents(this.chromeApi.fileSystem.root, parseLibrary.bind(this));
314 }
315 },
316 ////////////////////////////////////////////////////////////////////
317 //
300 _dispatchEvent: { 318 _dispatchEvent: {
301 enumerable: true, 319 enumerable: true,
302 value: function () { 320 value: function () {