diff options
Diffstat (limited to 'js/io/system')
-rwxr-xr-x | js/io/system/coreioapi.js | 1 | ||||
-rwxr-xr-x | js/io/system/fileio.js | 22 |
2 files changed, 21 insertions, 2 deletions
diff --git a/js/io/system/coreioapi.js b/js/io/system/coreioapi.js index 3a007028..e55789c4 100755 --- a/js/io/system/coreioapi.js +++ b/js/io/system/coreioapi.js | |||
@@ -207,7 +207,6 @@ exports.CoreIoApi = Montage.create(Component, { | |||
207 | directoryServiceURL: { | 207 | directoryServiceURL: { |
208 | enumerable: false, | 208 | enumerable: false, |
209 | get: function() { | 209 | get: function() { |
210 | console.log(this); | ||
211 | return String(this.rootUrl+this._directoryServiceURL); | 210 | return String(this.rootUrl+this._directoryServiceURL); |
212 | }, | 211 | }, |
213 | set: function(value) { | 212 | set: function(value) { |
diff --git a/js/io/system/fileio.js b/js/io/system/fileio.js index ac5812e9..f40aa96b 100755 --- a/js/io/system/fileio.js +++ b/js/io/system/fileio.js | |||
@@ -11,7 +11,7 @@ NOTES: | |||
11 | empty file will be created. 'contents' should be a string to be saved | 11 | empty file will be created. 'contents' should be a string to be saved |
12 | as the file. 'contentType' is the mime type of the file. | 12 | as the file. 'contentType' is the mime type of the file. |
13 | 13 | ||
14 | coreIoApi: this.application.ninja.coreIoApi | 14 | Core API reference in NINJA: this.application.ninja.coreIoApi |
15 | 15 | ||
16 | //////////////////////////////////////////////////////////////////////// | 16 | //////////////////////////////////////////////////////////////////////// |
17 | ///////////////////////////////////////////////////////////////////// */ | 17 | ///////////////////////////////////////////////////////////////////// */ |
@@ -65,24 +65,44 @@ exports.FileIo = Montage.create(Object.prototype, { | |||
65 | readFile: { | 65 | readFile: { |
66 | enumerable: true, | 66 | enumerable: true, |
67 | value: function() { | 67 | value: function() { |
68 | //Checking for API to be available | ||
69 | if (!this.application.ninja.coreIoApi.cloudAvailable()) { | ||
70 | //API not available, no IO action taken | ||
71 | return null; | ||
72 | } | ||
68 | // | 73 | // |
69 | } | 74 | } |
70 | }, | 75 | }, |
71 | saveFile: { | 76 | saveFile: { |
72 | enumerable: true, | 77 | enumerable: true, |
73 | value: function() { | 78 | value: function() { |
79 | //Checking for API to be available | ||
80 | if (!this.application.ninja.coreIoApi.cloudAvailable()) { | ||
81 | //API not available, no IO action taken | ||
82 | return null; | ||
83 | } | ||
74 | // | 84 | // |
75 | } | 85 | } |
76 | }, | 86 | }, |
77 | copyFile: { | 87 | copyFile: { |
78 | enumerable: true, | 88 | enumerable: true, |
79 | value: function() { | 89 | value: function() { |
90 | //Checking for API to be available | ||
91 | if (!this.application.ninja.coreIoApi.cloudAvailable()) { | ||
92 | //API not available, no IO action taken | ||
93 | return null; | ||
94 | } | ||
80 | // | 95 | // |
81 | } | 96 | } |
82 | }, | 97 | }, |
83 | infoFile: { | 98 | infoFile: { |
84 | enumerable: true, | 99 | enumerable: true, |
85 | value: function() { | 100 | value: function() { |
101 | //Checking for API to be available | ||
102 | if (!this.application.ninja.coreIoApi.cloudAvailable()) { | ||
103 | //API not available, no IO action taken | ||
104 | return null; | ||
105 | } | ||
86 | // | 106 | // |
87 | } | 107 | } |
88 | } | 108 | } |