diff options
author | Jose Antonio Marquez | 2012-02-09 15:02:16 -0800 |
---|---|---|
committer | Jose Antonio Marquez | 2012-02-09 15:02:16 -0800 |
commit | 74efc1238f51e9c0ffdeffe2a349f66011ef9f17 (patch) | |
tree | e50598ebfe139b7cda4a3ff9702d7d3243cbd6b2 /js/io/system/coreioapi.js | |
parent | 44c65bc6bbd5b754f9073f93a3afca8dd9acc864 (diff) | |
download | ninja-74efc1238f51e9c0ffdeffe2a349f66011ef9f17.tar.gz |
File Open
Adding file open functionality.
Diffstat (limited to 'js/io/system/coreioapi.js')
-rwxr-xr-x | js/io/system/coreioapi.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/js/io/system/coreioapi.js b/js/io/system/coreioapi.js index d9505cd6..f62133ac 100755 --- a/js/io/system/coreioapi.js +++ b/js/io/system/coreioapi.js | |||
@@ -92,9 +92,15 @@ exports.CoreIoApi = Montage.create(Component, { | |||
92 | //TODO: Remove test | 92 | //TODO: Remove test |
93 | //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'); |
94 | //this.ninjaLibrary.deleteLibraries(); | 94 | //this.ninjaLibrary.deleteLibraries(); |
95 | window.hack = function (name, type) { | 95 | /* |
96 | window.hack = function (name, type) { | ||
96 | this.application.ninja.ioMediator.fileNew('Users/kgq387/Desktop/Ninja Cloud/Disk/'+name+'.'+type, '/js/io/templates/files/'+type+'.txt', function (status) {console.log(status)}); | 97 | this.application.ninja.ioMediator.fileNew('Users/kgq387/Desktop/Ninja Cloud/Disk/'+name+'.'+type, '/js/io/templates/files/'+type+'.txt', function (status) {console.log(status)}); |
97 | }.bind(this); | 98 | }.bind(this); |
99 | */ | ||
100 | window.hack = function (path) { | ||
101 | // | ||
102 | this.application.ninja.ioMediator.fileOpen('Users/kgq387/Desktop/Ninja Cloud/Disk/'+path, function (result) {console.log(result)}); | ||
103 | }.bind(this); | ||
98 | } | 104 | } |
99 | }, | 105 | }, |
100 | //////////////////////////////////////////////////////////////////// | 106 | //////////////////////////////////////////////////////////////////// |
@@ -621,7 +627,7 @@ exports.CoreIoApi = Montage.create(Component, { | |||
621 | // 200 - the file was read and its contents were returned | 627 | // 200 - the file was read and its contents were returned |
622 | // 404 - the file does not exist | 628 | // 404 - the file does not exist |
623 | // 500 - unknown server error occurred | 629 | // 500 - unknown server error occurred |
624 | openFile: { | 630 | readFile: { |
625 | enumerable: false, | 631 | enumerable: false, |
626 | value: function(file) { | 632 | value: function(file) { |
627 | // | 633 | // |