From 8c530e9291721083ba11746fc5b3da66dc692120 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Sun, 5 Feb 2012 10:42:58 -0800 Subject: Setting up IO Ninja Library This class will be used to copy locally the library needed for Ninja's IO. --- js/io/system/chromeapi.js | 49 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) (limited to 'js/io/system/chromeapi.js') diff --git a/js/io/system/chromeapi.js b/js/io/system/chromeapi.js index d1ff6da3..04e62b11 100644 --- a/js/io/system/chromeapi.js +++ b/js/io/system/chromeapi.js @@ -7,6 +7,8 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot /* ///////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// NOTES: + The init function starts up the file system API, and a size must be + set, no unlimited available as of now. //////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// */ // @@ -24,9 +26,11 @@ exports.ChromeApi = Montage.create(Object.prototype, { //Current way to init Chrome's fileSystem API window.webkitRequestFileSystem(window.PERSISTENT, size*1024*1024, function (fs) { this.fileSystem = fs; - }).bind(this); + }.bind(this)); + return true; } else { //No fileSystem API + return false; } } }, @@ -46,6 +50,49 @@ exports.ChromeApi = Montage.create(Object.prototype, { set: function(value) { this._fileSystem = value; } + }, + //////////////////////////////////////////////////////////////////// + // + directoryNew: { + enumerable: true, + value: function() { + } + }, + + //////////////////////////////////////////////////////////////////// + // + directoryDelete: {//TODO: Make sure it uses a force delete + enumerable: true, + value: function() { + } + }, + //////////////////////////////////////////////////////////////////// + // + directoryContents: { + enumerable: true, + value: function() { + } + }, + //////////////////////////////////////////////////////////////////// + // + directoryCopy: { + enumerable: true, + value: function() { + } + }, + //////////////////////////////////////////////////////////////////// + // + directoryRename: { + enumerable: true, + value: function() { + } + }, + //////////////////////////////////////////////////////////////////// + // + directoryMove: { + enumerable: true, + value: function() { + } } //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// -- cgit v1.2.3