diff options
author | Eric Guzman | 2012-02-22 23:19:45 -0800 |
---|---|---|
committer | Eric Guzman | 2012-02-22 23:19:45 -0800 |
commit | 9e8cd4448a6d0f809a55c3bdea8b45ed75339794 (patch) | |
tree | c7b5105153f17aedecd0669c611dbea44be7374c /js/io/system | |
parent | a5ee11857f923d3e49b44c0a8c480e9d0b026d5b (diff) | |
parent | 2afef244a3f8124f8a049e504e9782c05904ce23 (diff) | |
download | ninja-9e8cd4448a6d0f809a55c3bdea8b45ed75339794.tar.gz |
Merge branch 'refs/heads/master' into CSSPanelUpdates
Diffstat (limited to 'js/io/system')
-rwxr-xr-x | js/io/system/coreioapi.js | 31 |
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 | }); |