aboutsummaryrefslogtreecommitdiff
path: root/js/io/system/coreioapi.js
diff options
context:
space:
mode:
authorJose Antonio Marquez Russo2012-02-18 19:40:43 -0800
committerJose Antonio Marquez Russo2012-02-18 19:40:43 -0800
commitc466bcf61351b50f678100ca14096f71a0a71bd0 (patch)
tree4ac283e0e7724e5ede21c1a1e97d121033578c72 /js/io/system/coreioapi.js
parente23708721a71ca4c71365f5f8e8ac7d6113926db (diff)
parent8fdce771bfcf662cf1acc16d45e4361ffd06c53e (diff)
downloadninja-c466bcf61351b50f678100ca14096f71a0a71bd0.tar.gz
Merge pull request #10 from ananyasen/FileIO
FileIO branch pull request
Diffstat (limited to 'js/io/system/coreioapi.js')
-rwxr-xr-xjs/io/system/coreioapi.js31
1 files changed, 0 insertions, 31 deletions
diff --git a/js/io/system/coreioapi.js b/js/io/system/coreioapi.js
index a75b59bb..2051da43 100755
--- a/js/io/system/coreioapi.js
+++ b/js/io/system/coreioapi.js
@@ -1096,37 +1096,6 @@ exports.CoreIoApi = Montage.create(Component, {
1096 } 1096 }
1097 return status; 1097 return status;
1098 } 1098 }
1099 },
1100
1101 ////////////////////////////////////////////////////////////////////
1102 /***
1103 * check if the file exists
1104 */
1105 checkFileExists:{
1106 value: function(fileName, folderUri, fileType){
1107 var uri = "", response=null, status=true;
1108
1109 //prepare absolute uri
1110 if(/[^/\\]$/g.test(folderUri)){
1111 folderUri = folderUri + "/";
1112 }
1113
1114 if(!!fileType && (fileName.lastIndexOf(fileType) !== (fileName.length - fileType.length))){
1115 fileName = fileName+fileType;
1116 }
1117
1118 uri = ""+folderUri+fileName;
1119
1120 response = this.fileExists({"uri":uri});
1121 if(!!response && response.success && (response.status === 204)){
1122 status = true;
1123 }else if(!!response && response.success && (response.status === 404)){
1124 status = false;
1125 }else{
1126 status = false;
1127 }
1128 return status;
1129 }
1130 } 1099 }
1131 //////////////////////////////////////////////////////////////////// 1100 ////////////////////////////////////////////////////////////////////
1132}); 1101});