2013-05-31 01:38:44 +00:00
|
|
|
define(function(require) {
|
|
|
|
|
2013-05-31 19:03:18 +00:00
|
|
|
var O_READ = 'READ';
|
|
|
|
var O_WRITE = 'WRITE';
|
|
|
|
var O_CREATE = 'CREATE';
|
|
|
|
var O_EXCLUSIVE = 'EXCLUSIVE';
|
|
|
|
var O_TRUNCATE = 'TRUNCATE';
|
|
|
|
var O_APPEND = 'APPEND';
|
2013-12-20 08:34:05 +00:00
|
|
|
var XATTR_CREATE = 'CREATE';
|
|
|
|
var XATTR_REPLACE = 'REPLACE';
|
2013-05-31 19:03:18 +00:00
|
|
|
|
2013-05-31 01:38:44 +00:00
|
|
|
return {
|
2013-11-27 00:12:25 +00:00
|
|
|
FILE_SYSTEM_NAME: 'local',
|
|
|
|
|
2013-05-31 01:38:44 +00:00
|
|
|
FILE_STORE_NAME: 'files',
|
|
|
|
|
|
|
|
IDB_RO: 'readonly',
|
|
|
|
IDB_RW: 'readwrite',
|
|
|
|
|
2013-11-27 21:52:52 +00:00
|
|
|
WSQL_VERSION: "1",
|
|
|
|
WSQL_SIZE: 5 * 1024 * 1024,
|
|
|
|
WSQL_DESC: "FileSystem Storage",
|
|
|
|
|
2013-05-31 01:38:44 +00:00
|
|
|
MODE_FILE: 'FILE',
|
|
|
|
MODE_DIRECTORY: 'DIRECTORY',
|
|
|
|
MODE_SYMBOLIC_LINK: 'SYMLINK',
|
2013-12-14 19:42:00 +00:00
|
|
|
MODE_META: 'META',
|
2013-05-31 01:38:44 +00:00
|
|
|
|
2013-11-23 18:34:48 +00:00
|
|
|
SYMLOOP_MAX: 10,
|
|
|
|
|
2013-05-31 01:38:44 +00:00
|
|
|
BINARY_MIME_TYPE: 'application/octet-stream',
|
|
|
|
JSON_MIME_TYPE: 'application/json',
|
|
|
|
|
|
|
|
ROOT_DIRECTORY_NAME: '/', // basename(normalize(path))
|
|
|
|
|
|
|
|
FS_FORMAT: 'FORMAT',
|
|
|
|
|
2013-05-31 19:03:18 +00:00
|
|
|
O_READ: O_READ,
|
|
|
|
O_WRITE: O_WRITE,
|
|
|
|
O_CREATE: O_CREATE,
|
|
|
|
O_EXCLUSIVE: O_EXCLUSIVE,
|
|
|
|
O_TRUNCATE: O_TRUNCATE,
|
|
|
|
O_APPEND: O_APPEND,
|
|
|
|
|
|
|
|
O_FLAGS: {
|
|
|
|
'r': [O_READ],
|
|
|
|
'r+': [O_READ, O_WRITE],
|
|
|
|
'w': [O_WRITE, O_CREATE, O_TRUNCATE],
|
|
|
|
'w+': [O_WRITE, O_READ, O_CREATE, O_TRUNCATE],
|
|
|
|
'wx': [O_WRITE, O_CREATE, O_EXCLUSIVE, O_TRUNCATE],
|
|
|
|
'wx+': [O_WRITE, O_READ, O_CREATE, O_EXCLUSIVE, O_TRUNCATE],
|
|
|
|
'a': [O_WRITE, O_CREATE, O_APPEND],
|
|
|
|
'a+': [O_WRITE, O_READ, O_CREATE, O_APPEND],
|
|
|
|
'ax': [O_WRITE, O_CREATE, O_EXCLUSIVE, O_APPEND],
|
2013-11-22 21:12:31 +00:00
|
|
|
'ax+': [O_WRITE, O_READ, O_CREATE, O_EXCLUSIVE, O_APPEND]
|
2013-05-31 19:03:18 +00:00
|
|
|
},
|
2013-05-31 01:38:44 +00:00
|
|
|
|
2013-12-20 08:34:05 +00:00
|
|
|
XATTR_CREATE: XATTR_CREATE,
|
|
|
|
XATTR_REPLACE: XATTR_REPLACE,
|
|
|
|
|
2013-05-31 01:38:44 +00:00
|
|
|
FS_READY: 'READY',
|
|
|
|
FS_PENDING: 'PENDING',
|
2013-12-14 19:42:00 +00:00
|
|
|
FS_ERROR: 'ERROR',
|
|
|
|
|
|
|
|
SUPER_NODE_ID: '00000000-0000-0000-0000-000000000000'
|
2013-05-31 01:38:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
});
|