Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit c2c1eaa

Browse files
committed
Merge pull request #2094 from maks/fileerror-shim
define FileError shim inside module
2 parents b2e1dc7 + e8bc1bb commit c2c1eaa

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/file/NativeFileSystem.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,26 @@
2222
*/
2323

2424
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50*/
25-
/*global $, define, brackets, FileError, InvalidateStateError */
25+
/*global $, define, brackets, FileError, InvalidateStateError, window */
2626

2727
define(function (require, exports, module) {
2828
"use strict";
29+
30+
//define FileError as currently ONLY Chrome implements the File API W3C Working Draft
31+
window.FileError = window.FileError || {
32+
NOT_FOUND_ERR: 1,
33+
SECURITY_ERR: 2,
34+
ABORT_ERR: 3,
35+
NOT_READABLE_ERR: 4,
36+
ENCODING_ERR: 5,
37+
NO_MODIFICATION_ALLOWED_ERR: 6,
38+
INVALID_STATE_ERR: 7,
39+
SYNTAX_ERR: 8,
40+
INVALID_MODIFICATION_ERR: 9,
41+
QUOTA_EXCEEDED_ERR: 10,
42+
TYPE_MISMATCH_ERR: 11,
43+
PATH_EXISTS_ERR: 12
44+
};
2945

3046
var Async = require("utils/Async");
3147

0 commit comments

Comments
 (0)