aboutsummaryrefslogtreecommitdiff
path: root/js/io/system
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
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')
-rwxr-xr-xjs/io/system/coreioapi.js10
-rw-r--r--js/io/system/ninjalibrary.js18
-rw-r--r--js/io/system/ninjalibrary.json4
3 files changed, 22 insertions, 10 deletions
diff --git a/js/io/system/coreioapi.js b/js/io/system/coreioapi.js
index e2c2e4dd..0e721500 100755
--- a/js/io/system/coreioapi.js
+++ b/js/io/system/coreioapi.js
@@ -89,15 +89,9 @@ exports.CoreIoApi = Montage.create(Component, {
89 this.ninjaLibrary.coreApi = this; 89 this.ninjaLibrary.coreApi = this;
90 //TODO: Add sync loading screen logic 90 //TODO: Add sync loading screen logic
91 91
92
93
94
95 //TODO: Remove test 92 //TODO: Remove test
96 this.ninjaLibrary.copyLibToCloud('Users/kgq387/Desktop/Ninja Cloud/Disk', 'montage0.6.0'); 93 //this.ninjaLibrary.copyLibToCloud('Users/kgq387/Desktop/Ninja Cloud/Disk', 'montage0.6.0');
97 94 //this.ninjaLibrary.deleteLibraries();
98
99
100
101 } 95 }
102 }, 96 },
103 //////////////////////////////////////////////////////////////////// 97 ////////////////////////////////////////////////////////////////////
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 () {
diff --git a/js/io/system/ninjalibrary.json b/js/io/system/ninjalibrary.json
index 87dff7f6..272cc2c7 100644
--- a/js/io/system/ninjalibrary.json
+++ b/js/io/system/ninjalibrary.json
@@ -1,6 +1,6 @@
1{ 1{
2 "libraries": [ 2 "libraries": [
3 {"name": "Montage", "path": "/ninja-internal/node_modules/descriptor.json", "version": "0.6.0"}, 3 {"name": "Montage", "path": "/node_modules/descriptor.json", "version": "0.6.0"},
4 {"name": "RDGE", "path": "/ninja-internal/js/helper-classes/RDGE/rdge-compiled.js", "version": "0.6.0", "file": "rdge-compiled.js"} 4 {"name": "RDGE", "path": "/js/helper-classes/RDGE/rdge-compiled.js", "version": "0.6.0", "file": "rdge-compiled.js"}
5 ] 5 ]
6} \ No newline at end of file 6} \ No newline at end of file