aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/components/ui/FilePicker/file-picker-controller.js10
-rw-r--r--js/io/utils/file-utils.js4
2 files changed, 7 insertions, 7 deletions
diff --git a/js/components/ui/FilePicker/file-picker-controller.js b/js/components/ui/FilePicker/file-picker-controller.js
index f14857ac..635da3a2 100755
--- a/js/components/ui/FilePicker/file-picker-controller.js
+++ b/js/components/ui/FilePicker/file-picker-controller.js
@@ -8,7 +8,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
8var Montage = require("montage/core/core").Montage, 8var Montage = require("montage/core/core").Montage,
9 pickerNavigatorReel = require("js/components/ui/FilePicker/pickerNavigator.reel").PickerNavigator, 9 pickerNavigatorReel = require("js/components/ui/FilePicker/pickerNavigator.reel").PickerNavigator,
10 filePickerModelModule = require("js/components/ui/FilePicker/file-picker-model"), 10 filePickerModelModule = require("js/components/ui/FilePicker/file-picker-model"),
11 fileSystem = require("js/io/system/filesystem").FileSystem, 11 fileSystem = require("js/io/system/coreioapi").CoreIoApi,
12 Popup = require("montage/ui/popup/popup.reel").Popup; 12 Popup = require("montage/ui/popup/popup.reel").Popup;
13 13
14//singleton with functions to create a new file picker instance and utilities to format or filter the model data 14//singleton with functions to create a new file picker instance and utilities to format or filter the model data
@@ -101,7 +101,7 @@ var FilePickerController = exports.FilePickerController = Montage.create(require
101 var aModel = filePickerModelModule.FilePickerModel.create(); 101 var aModel = filePickerModelModule.FilePickerModel.create();
102 102
103 var topLevelDirectories = null; 103 var topLevelDirectories = null;
104 var driveData = fileSystem.shellApiHandler.getDirectoryContents({uri:"", recursive:false, returnType:"all"}); 104 var driveData = fileSystem.getDirectoryContents({uri:"", recursive:false, returnType:"all"});
105 if(driveData.success){ 105 if(driveData.success){
106 topLevelDirectories = (JSON.parse(driveData.content)).children; 106 topLevelDirectories = (JSON.parse(driveData.content)).children;
107 }else{ 107 }else{
@@ -244,7 +244,7 @@ var FilePickerController = exports.FilePickerController = Montage.create(require
244 || !this._directoryContentCache[folderUri].children){ 244 || !this._directoryContentCache[folderUri].children){
245 //get data using IO api 245 //get data using IO api
246 try{ 246 try{
247 var iodata = fileSystem.shellApiHandler.getDirectoryContents({uri:folderUri, recursive:false, returnType:"all"}); 247 var iodata = fileSystem.getDirectoryContents({uri:folderUri, recursive:false, returnType:"all"});
248 //console.log("IO:getDirectoryContents:Response:\n"+"uri="+folderUri+"\n status="+iodata.status+"\n content= "+iodata.content); 248 //console.log("IO:getDirectoryContents:Response:\n"+"uri="+folderUri+"\n status="+iodata.status+"\n content= "+iodata.content);
249 if(iodata.success && (iodata.status === 200) && (iodata.content !== null)){ 249 if(iodata.success && (iodata.status === 200) && (iodata.content !== null)){
250 folderContent = JSON.parse(iodata.content); 250 folderContent = JSON.parse(iodata.content);
@@ -456,7 +456,7 @@ var FilePickerController = exports.FilePickerController = Montage.create(require
456 //check for directory staleness.... if stale query filesystem 456 //check for directory staleness.... if stale query filesystem
457 if((new Date()).getTime() > (this._directoryContentCache[folderUri].queriedTimeStamp + this.cacheStaleTime)){ 457 if((new Date()).getTime() > (this._directoryContentCache[folderUri].queriedTimeStamp + this.cacheStaleTime)){
458 try{ 458 try{
459 var ifModifiedResponse = fileSystem.shellApiHandler.isDirectoryModified({uri:folderUri, recursive:false, returnType:"all"}, this._directoryContentCache[folderUri].queriedTimeStamp); 459 var ifModifiedResponse = fileSystem.isDirectoryModified({uri:folderUri, recursive:false, returnType:"all"}, this._directoryContentCache[folderUri].queriedTimeStamp);
460 //console.log("ifModifiedResponse"); 460 //console.log("ifModifiedResponse");
461 //console.log(ifModifiedResponse); 461 //console.log(ifModifiedResponse);
462 }catch(e){ 462 }catch(e){
@@ -468,7 +468,7 @@ var FilePickerController = exports.FilePickerController = Montage.create(require
468 wasStale = true; 468 wasStale = true;
469 //uri has changed. so update cache 469 //uri has changed. so update cache
470 try{ 470 try{
471 var iodata = fileSystem.shellApiHandler.getDirectoryContents({uri:folderUri, recursive:false, returnType:"all"}); 471 var iodata = fileSystem.getDirectoryContents({uri:folderUri, recursive:false, returnType:"all"});
472 //console.log("IO:getDirectoryContents:Response:\n"+"uri="+folderUri+"\n status="+iodata.status+"\n content= "+iodata.content); 472 //console.log("IO:getDirectoryContents:Response:\n"+"uri="+folderUri+"\n status="+iodata.status+"\n content= "+iodata.content);
473 if(iodata.success && (iodata.status === 200) && (iodata.content !== null)){ 473 if(iodata.success && (iodata.status === 200) && (iodata.content !== null)){
474 folderContent = JSON.parse(iodata.content); 474 folderContent = JSON.parse(iodata.content);
diff --git a/js/io/utils/file-utils.js b/js/io/utils/file-utils.js
index c43fb41c..0afdffc6 100644
--- a/js/io/utils/file-utils.js
+++ b/js/io/utils/file-utils.js
@@ -4,7 +4,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. 4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */ 5</copyright> */
6 6
7var fileSystem = require("js/io/system/filesystem").FileSystem; 7var fileSystem = require("js/io/system/coreioapi").CoreIoApi;
8 8
9var FileUtils = exports.FileUtils = Object.create(Object.prototype, { 9var FileUtils = exports.FileUtils = Object.create(Object.prototype, {
10 10
@@ -61,7 +61,7 @@ var FileUtils = exports.FileUtils = Object.create(Object.prototype, {
61 61
62 uri = ""+folderUri+fileUri; 62 uri = ""+folderUri+fileUri;
63 63
64 response = fileSystem.shellApiHandler.fileExists({"uri":uri}); 64 response = fileSystem.fileExists({"uri":uri});
65 if(!!response && response.success && (response.status === 204)){ 65 if(!!response && response.success && (response.status === 204)){
66 status = true; 66 status = true;
67 }else if(!!response && response.success && (response.status === 404)){ 67 }else if(!!response && response.success && (response.status === 404)){