From 0db246b19dc0b50f4f663a147ec92c49e656ae35 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Mon, 6 Feb 2012 16:32:15 -0800 Subject: Adding logic to copy ninja libraries Setting up the logic to handling copying ninja required libraries into the app local file system sandbox to be used by cloud simulator. --- js/io/system/chromeapi.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'js/io/system/chromeapi.js') diff --git a/js/io/system/chromeapi.js b/js/io/system/chromeapi.js index f4e04a09..fb141687 100644 --- a/js/io/system/chromeapi.js +++ b/js/io/system/chromeapi.js @@ -69,9 +69,16 @@ exports.ChromeApi = Montage.create(Object.prototype, { //////////////////////////////////////////////////////////////////// // - directoryDelete: {//TODO: Make sure it uses a force delete + directoryDelete: { enumerable: true, - value: function() { + value: function(directoryPath, callback) { + // + this.fileSystem.getDirectory(directoryPath, {}, function(dirEntry) { + // + dirEntry.removeRecursively(function() { + callback(true); + }); + }, function (e) {callback(false)}); } }, //////////////////////////////////////////////////////////////////// -- cgit v1.2.3